-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(spans): Use Span V2 kafka schema in span consumers #100181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
span.data in span consumers
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
span.data in span consumers|
|
||
|
|
||
| def _find_segment_span(spans: list[SegmentSpan]) -> SegmentSpan | None: | ||
| def _find_segment_span(spans: list[SpanEvent]) -> SpanEvent | None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both kafka topics ("ingest-spans" and "buffered-segments") now use the same span format.
|
Tests will be red until getsentry/sentry-kafka-schemas#440 gets merged. |
| I64_MAX = 2**63 - 1 | ||
|
|
||
| FIELD_TO_ATTRIBUTE = { | ||
| "description": "sentry.raw_description", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer necessary because sentry.description is instead renamed to sentry.raw_description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly!
Before we merge getsentry/sentry#100181, we should make sure that there is no way back for the kafka producer (i.e. relay) to produce old span messages. - [ ] Handle kafka schema validation errors in integration tests. ref: INGEST-535
The span consumers in sentry have been [updated to use the new kafka span schema](getsentry/sentry#100181), so we can remove legacy fields from the producer. Fixes INGEST-537
See https://linear.app/getsentry/project/align-sentry-span-kafka-schema-with-span-v2-a77fced29f22/overview.
Requires getsentry/sentry-kafka-schemas#440.
Closes: INGEST-533, INGEST-535, INGEST-536, INGEST-539
Note
Switch span processing from legacy data fields to Span V2 attributes, updating buffers, consumers, enrichment, conversion, grouping, insights, and tests.
data[...]withattributes[...]across enrichment, shims, message handling, and conversion; addattribute_valuehelper andAttributestypes.start_timestamp/end_timestamp; removeend_timestamp_preciseusage; compute and storesentry.duration_msandsentry.exclusive_time_msin attributes.Span.end_timestamp_precise->end_timestamp; when flushing, setattributes.sentry.segment.idandattributes.sentry.is_segmentinstead of top-level fields.TraceItem.attributesfromattributes+ selected top-level fields; rename some attributes (e.g.,sentry.description->sentry.raw_description); encode span links with allowed attribute keys.attributes(notdata).segment_id/flags from attributes, update breakdowns intoattributes, and use attributes for releases/environments/signals.FilterSpan.from_span_attributesand use it for module detection.attributes, new timestamps, buffer flush output).Written by Cursor Bugbot for commit e15c5ee. This will update automatically on new commits. Configure here.