-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat(spans): Extract op/description while converting otel spans to sentry spans #3287
Conversation
8bf48f4
to
7ac455d
Compare
7ac455d
to
fa01721
Compare
ba31290
to
cc92144
Compare
cc92144
to
4917928
Compare
Co-authored-by: David Herberth <[email protected]>
@@ -103,6 +107,23 @@ pub fn otel_to_sentry_span(otel_span: OtelSpan) -> EventSpan { | |||
}; | |||
if key == "sentry.op" { | |||
op = otel_value_to_string(value); | |||
} else if key.starts_with("db") { | |||
op = op.or(Some("db".to_string())); |
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.
Maybe we should remove the support for sentry.op
since I don't think it will be used given we'll start auto-detecting the op in Relay and with this, it means we could potentially overwrite the op after detecting it.
cc @AbhiPrasad
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.
yea this whole logic is a bit iffy because i stuck with one pass through the attributes array, it would be easier if this was a hashmap or we can also do multiple passes through the array to avoid the overwriting for cleaner logic.
but as a first version this is fine I think, we can iterate and clean up later.
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.
I don't think we can convert that as a hash map as it's the way the OTel schema is but multiple passes on the array would be cleaner indeed.
Co-authored-by: David Herberth <[email protected]>
5e27299
to
ecfdba8
Compare
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.
@phacops @AbhiPrasad do we track a mapping between OTel span fields and Sentry span fields somewhere, or is Relay the source of truth?
It would be nice to have these mappings listed in a declarative way, either in Relay itself or in dev docs.
@AbhiPrasad started https://github.com/getsentry/sentry-conventions to track those conventions. Right now, I'd say Relay is the source of truth. |
We need the op/description for these cases for further tag/metric extraction and for stuff to show up in the product.