Skip to content

ref(eap-items): remove eap_items.non_uuid_id metric#8105

Closed
phacops wants to merge 5 commits into
masterfrom
claude/remove-metric-lucid-ramanujan-ldrmdw
Closed

ref(eap-items): remove eap_items.non_uuid_id metric#8105
phacops wants to merge 5 commits into
masterfrom
claude/remove-metric-lucid-ramanujan-ldrmdw

Conversation

@phacops

@phacops phacops commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the eap_items.non_uuid_id counter metric that was added in #8100 (pierre/lucid-ramanujan-rqdn2f).

The metric was emitted inside parse_uuid_or_random whenever a malformed conversation_id or session_id string arrived on a TraceItem. The handling logic (randomize instead of storing nil/bad data) is preserved unchanged — only the counter! call and the now-unused field parameter are removed.

Changes

  • Drop counter!("eap_items.non_uuid_id", ...) from parse_uuid_or_random
  • Remove the field: &str parameter (only existed to supply the metric tag)
  • Update both call sites and the doc comment accordingly
  • Collapse the two Err/nil arms into a single wildcard arm

Test plan

  • cargo check passes
  • All existing unit tests for parse_uuid_or_random / conversation_id / session_id continue to pass (behaviour is identical)

Generated by Claude Code

claude added 5 commits June 25, 2026 15:32
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.
@phacops phacops requested a review from a team as a code owner June 25, 2026 15:36
@phacops phacops closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants