Repository navigation
feat(telemetry): measure how long survivors are hunted - #318
Open
TheMeinerLP wants to merge 4 commits into
Open
TheMeinerLP wants to merge 4 commits into
TheMeinerLP wants to merge 4 commits into
Conversation
…/telemetry-hunt-duration
A span per creek hunt with its outcome and duration, and cygnus.creek.hunt.duration / cygnus.creek.hunts metrics by outcome and map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Measures how long survivors are hunted by the creek: a span per hunt and a histogram/counter by outcome and map.
Depends on #310 and #317. This branch is based on #317 (tick metrics, which in turn is based on #316) with
feat/creek-hunted-tab(#310) merged in, for thehunted/huntEndedhooks. Merge #316, #317 and #310 first, then rebase this onto main.Change.
cygnus.action.creek.hunt, child of the current phase, from hunt start to end:cygnus.player.uuid,cygnus.player.role, start position,cygnus.map,cygnus.creek.hunt.outcome(caught|timeout|gone|escaped|round_end) andcygnus.creek.hunt.duration_ms.cygnus.creek.hunt.duration(ms, like the tick metrics) and countercygnus.creek.hunts, attributescygnus.creek.hunt.outcomeandcygnus.maponly; no player on metrics.HuntEndenum,HuntState.end()records catch/timeout/gone, andCreekreportsCreekWitness.huntEnded(UUID, HuntEnd)(a default method that falls back tohuntEnded(UUID), so existing witnesses are unchanged).SENT_AWAYmaps toescaped,REMOVEDtoround_end.HuntedTabWitnessandTracingCreekWitnessforward the new method. The catch callback fires just before the hunt ends, which is why the reason is read from the state, not paired up from two callbacks.round_endby a newRoundTracer.onRoundEndinghook, before the phase span closes. A hunt with no round running has no span but is counted.Clock. The creek reports hunts by survivor only, so two creeks on one survivor give two spans that close oldest first (documented).docs/telemetry.md: hunts section.Types of changes
Checklist
Further comments
Test plan.
HuntTracerTest: span outcome and duration for every end path, attributes and parent phase, histogram with outcome and map, no player on metrics, round end closes open hunts before the phase, two hunts on one survivor, cached attributes.HuntStateEndTest: caught, timeout, gone and running.CreekIntegrationTest:Creekreports the rightHuntEndfor catch, timeout, gone, removed and sent away../gradlew :game:test :common:testis green.