ref(eap-items): remove eap_items.non_uuid_id metric#8105
Closed
phacops wants to merge 5 commits into
Closed
Conversation
Populate the conversation_id and session_id columns (added by migration 0060) in the eap-items processor from the new TraceItem proto fields. Both arrive as strings and are written to their non-nullable UUID columns, mapping absent or unparseable values to the nil UUID so a missing/malformed identifier never drops the whole item. Upgrade sentry-protos to 0.34.0 (Python and Rust), the first version that exposes conversation_id/session_id on TraceItem. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TS8xhdkBBisbYXFeTo2EyA
The eap-items JSON insert path now emits conversation_id and session_id (nil UUID when absent), so refresh the insta snapshot to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TS8xhdkBBisbYXFeTo2EyA
Rather than persisting the all-zero "magic" UUID when a TraceItem has no conversation_id/session_id (or sends an unparseable/nil value), generate a fresh random UUID. The all-zero value would be indistinguishable from a real all-zero id and would balloon the bloom-filter index with a single high-frequency value. This keeps the columns non-nullable (no migration). The schema-snapshot test redacts the two now-random fields to stay deterministic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TS8xhdkBBisbYXFeTo2EyA
The conversation_id/session_id columns are UUID, but the proto fields are unconstrained strings. Producers are expected to send UUID-formatted ids; a present value that fails to parse as a UUID now increments the `eap_items.non_uuid_id` metric (tagged by field) so non-UUID producers are detectable, instead of being silently swallowed. We still randomize (absent, explicit-nil, or non-UUID) so a valid UUID is always stored and an optional field never drops the whole item. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TS8xhdkBBisbYXFeTo2EyA
…r_random The metric was emitted when a malformed conversation_id or session_id was encountered. Removing it in favour of silent randomization to keep the ingestion path lean.
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.
Summary
Removes the
eap_items.non_uuid_idcounter metric that was added in #8100 (pierre/lucid-ramanujan-rqdn2f).The metric was emitted inside
parse_uuid_or_randomwhenever a malformedconversation_idorsession_idstring arrived on aTraceItem. The handling logic (randomize instead of storing nil/bad data) is preserved unchanged — only thecounter!call and the now-unusedfieldparameter are removed.Changes
counter!("eap_items.non_uuid_id", ...)fromparse_uuid_or_randomfield: &strparameter (only existed to supply the metric tag)Err/nil arms into a single wildcard armTest plan
cargo checkpassesparse_uuid_or_random/conversation_id/session_idcontinue to pass (behaviour is identical)Generated by Claude Code