Preserve and retry telemetry match boundaries across restarts
This commit is contained in:
+16
-12
@@ -129,7 +129,7 @@ It sends four event types over the life of a match, mirroring the T5 script:
|
||||
| `round_change` | Every new positive round | new round |
|
||||
| `game_end` | `end_game` / `game_ended` / `intermission` | final round |
|
||||
|
||||
Each event payload includes `event`, `server`, `map`, `round` (except `game_start`)
|
||||
Each event payload includes `event`, `server`, `map`, `match`, `seq`, `round` (except `game_start`)
|
||||
and a `players` array with `name`, `guid`, `kills`, `headshots`, `downs`, `revives`
|
||||
and `score` per player. `guid` reads Plutonium's `player.guid` engine property
|
||||
(T5 uses the `player getGuid()` method — T6 has no such method, but the field is
|
||||
@@ -137,17 +137,21 @@ equivalent for identity purposes). `kills`/`headshots`/`downs`/`revives` read
|
||||
from T6's stock match counters in `player.pers[]`; missing or negative values
|
||||
are reported as `0`. `score` is the player's current spendable `player.score`.
|
||||
|
||||
Delivery is asynchronous with a sequenced FIFO queue and one in-flight request.
|
||||
The queue survives the game-end signal so the final snapshot drains. There is no
|
||||
automatic retry: the receiver may already have accepted the event. Transport
|
||||
success reports the HTTP call finished, not that the API accepted it. The TWS
|
||||
plugin enforces 5-second connection and 15-second transfer deadlines, then
|
||||
releases a timed-out request so the sender can advance. Telemetry logs HTTP
|
||||
status and native timing diagnostics; non-2xx responses increment `http_rejected`
|
||||
separately from transport failures. Older plugins trigger a warning that native
|
||||
deadlines are unverified. Increase
|
||||
`tws_telemetry_log_level` to `2` for per-event capture/queue/response logging;
|
||||
set to `0` to silence non-error output.
|
||||
Delivery uses one in-flight request and a FIFO queue. Every match receives a
|
||||
native-generated key; `seq` starts at 1 for `game_start` and increases at capture.
|
||||
Start/end snapshots are saved to disk before sending and replayed before the next
|
||||
start after map/process restarts. Transport failures, native timeouts, HTTP 429
|
||||
and 5xx retain the head with 1–30 second backoff. Other 4xx are terminal. Round
|
||||
and heartbeat failures remain best effort; waiting heartbeats collapse to the
|
||||
newest snapshot. Acceptance requires 2xx plus the JSON boolean `ok: true`; logs
|
||||
include `telemetry.timing.matchId` as `ec_match_id` when available.
|
||||
|
||||
The TWS plugin still enforces 5-second connection and 15-second transfer deadlines.
|
||||
Increase `tws_telemetry_log_level` to `2` for capture/queue/response logging; set to
|
||||
`0` for errors and recovery. **Deploy Electric Cherry #144 and the updated native
|
||||
plugin before these scripts.** See the shared
|
||||
[delivery and rollout notes](../../README.md#telemetry-delivery-and-rollout-t5-and-t6)
|
||||
for outbox storage, error handling, limits and live validation.
|
||||
|
||||
## `.join` for newcomers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user