-
-
Couldn't load subscription status.
- Fork 4.5k
feat(spans): Use is_segment as alternative of is_remote
#102296
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
base: master
Are you sure you want to change the base?
Conversation
0eead62 to
7be5e5e
Compare
| # Iterate backwards since we usually expect the segment span to be at the end. | ||
| for span in reversed(spans): | ||
| if attribute_value(span, "sentry.is_segment"): | ||
| if span.get("is_segment"): |
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.
flush_segments now unconditionally sets this field (see buffer.py), so it safe to migrate away from attributes[sentry.is_segment] even if Relay does not write the top-level field yet.
| "sentry_tags": _sentry_tags(span.get("attributes") or {}), | ||
| "op": get_span_op(span), | ||
| "exclusive_time": attribute_value(span, "sentry.exclusive_time_ms"), | ||
| "is_segment": bool(attribute_value(span, "sentry.is_segment")), |
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 field is now set by flush_segments.
| exclusive_time: float | ||
| op: str | ||
| sentry_tags: dict[str, str] | ||
| is_segment: bool |
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 now part of the official schema.
7be5e5e to
7e0f537
Compare
is_segment as alternative of is_remote
❌ 62 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
This PR does two things:
is_remoteandis_segmentin the span consumer such that Relay can switch tois_segment.buffer.flush_segments, Write tois_segmentinstead ofattributes[sentry.is_segment]. This is not strictly necessary for the transition, but it does simplify the code (if we have a top-level field we might as well use it for the ground truth).Requires getsentry/sentry-kafka-schemas#451.
ref: INGEST-612