Repository navigation
feat: record queued events as metrics - #57
Merged
Merged
Conversation
Generated-by: LLM effort=high;harness=codex:0.164.0;model=openai:gpt-6.1-sol;session=sha-256-64:ca12ec0da8efeef9;surface=exec
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.
Why
The queue stores a large backlog of deliveries, and the worker refuses every one until a real recorder exists. This change adds that recorder. A later change wires it into the command, so nothing leaves the queue yet.
Behavior change
The worker hands each entry's event name and body to the recorder and no longer parses bodies itself. A new recorder package counts deliveries as OpenTelemetry metrics. The counters are
github.events,github.pr.merges,github.check.conclusions, andgithub.events.dropped. A delivery with an empty event name or an invalid body counts as a drop and leaves the queue. The command still uses the refusing placeholder. Attributes hold repository, event, action, check name, and conclusion. Titles, bodies, comments, and logins stay out.Verification
The full Bazel test run passed with 29 passed and 1 skipped. The recorder tests read an in-memory reader for every counter and both drop reasons.
Opened-by: LLM effort=medium;harness=claude-code:2.1.325;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli
Generated-by: LLM effort=high;harness=codex:0.164.0;model=openai:gpt-6.1-sol;session=sha-256-64:ca12ec0da8efeef9;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.325;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli