Add per-server telemetry request diagnostics
This commit is contained in:
@@ -94,6 +94,44 @@ and the limits of identifying matches from this protocol.
|
||||
The game scripts are uploaded artifacts, not source maintained in this
|
||||
repository. Their reporter should emit the three payloads above.
|
||||
|
||||
### Telemetry diagnostics
|
||||
|
||||
Open a server's **Diagnostics → Telemetry API requests** to inspect incoming
|
||||
`POST /api/telemetry` calls whose top-level `server` exactly matches its registered
|
||||
name. Each entry includes the Electric Cherry receipt time, HTTP result, error
|
||||
reason, event, map, round, player count, content type, and submitted JSON. Rejected
|
||||
reports are included, even when the content type is wrong but the body is readable
|
||||
JSON. Processing failures return 500 and record the internal error when diagnostic
|
||||
storage is available; failed database transactions do not update the scoreboard.
|
||||
|
||||
The panel refreshes every five seconds while visible and has a manual refresh
|
||||
button. History is stored in SQLite starting with this version, with up to 200
|
||||
requests per server from the last seven days and a fleet-wide cap of 10,000
|
||||
requests. Old entries are pruned when new requests arrive, and expired entries
|
||||
are excluded from reads. Payload previews are limited to 16,384 characters and
|
||||
marked when truncated. Request headers other than content type are not stored.
|
||||
`GET /api/servers/{name}/telemetry-requests` returns the same recent history,
|
||||
newest first, with caching disabled.
|
||||
|
||||
- **No entries:** no attributable requests are retained for this exact name.
|
||||
Check the reporter's destination and server field. Calls that never reach
|
||||
Electric Cherry, malformed JSON, and bodies without a usable server name
|
||||
cannot appear in this server's log. Earlier requests are not backfilled.
|
||||
- **400 / 415:** inspect the error and payload. One invalid player's stats or a
|
||||
duplicate GUID rejects the entire report. These requests do not update the
|
||||
scoreboard.
|
||||
- **404:** the reported server was not registered or had been destroyed at the
|
||||
time of the request.
|
||||
- **200:** Electric Cherry processed the report. An empty `players` array
|
||||
produces an empty scoreboard, including when sent with `game_end`. If a
|
||||
populated accepted report is missing from the scoreboard, investigate the
|
||||
live update/browser path.
|
||||
- **500:** Electric Cherry failed to process the request. Inspect the recorded
|
||||
error and the application log.
|
||||
|
||||
RCON's online status and player count are separate from gameplay telemetry, so
|
||||
an occupied server can still have no scoreboard report.
|
||||
|
||||
## Requirements
|
||||
|
||||
Requirements on a qualifying server are ANDed:
|
||||
|
||||
Reference in New Issue
Block a user