Profile the token endpoint by wall clock #137
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
CrowderSoup/vTodo!137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/token-wall-clock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The token endpoint takes 1–2 s on some requests:
/o/token/timingIts CPU profile shows only about 10 ms per request, so the time is spent waiting. CPU sampling can't see waits, and GlitchTip keeps no per-request spans.
This adds a wall-clock sampler that runs only during
WALL_CLOCK_ENDPOINTSrequests, which for now is just/o/token/:/ingest(through the same edge and credentials the agent uses) as<service>.wall{…}.endpoint.oncpu=Falsesetting applies to the whole process and would turn every profile into wall time.Cost: the sampler runs only while a token request is in flight (a few hundred a week). Push failures are logged and never affect the response.
To use it: in Pyroscope, choose the service, profile type
wall, andendpoint="/o/token/".Verified:
token_view;wait_for_row_lock 595ms plus 26 ms of compute.🤖 Generated with Claude Code