-
Notifications
You must be signed in to change notification settings - Fork 94
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(otlp): infer span category from attributes #4509
Conversation
@@ -8174,6 +8174,7 @@ expression: metrics | |||
], | |||
), | |||
tags: { | |||
"span.category": "ui", |
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.
Based on our docs on categories this update seems correct (in other words, it was incorrect that this was previously missing).
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 you can also find an existing integration test, which we can extend for this.
Relay assigns a
category
to incoming spans based on theirop
(see our docs for possible category values).Unlike Sentry's
op
field, OTel span names aren't structured and therefore can't be used to determine the spancategory
.In order to support categorizing incoming OTel spans, update the span categorization algorithm to:
sentry.category
attribute directly if given. This allows our SDKs to be explicit about the intended category and also lets users explicitly perform categorization in case our automatic categorization is ever incorrect.op
. This is what we do today, and will keep categorization consistent for Sentry SDK clients sending spans via transaction events now and in the future.op
is missing (e.g. an OTLP span), infer the category based on the span's attributes. This will categorize incoming OTel spans based on semantic conventions.Currently the inference only supports the five categories we use in the transaction summary page's operation filter, which is the page the Performance team is currently migrating to EAP. We'll expand it in the future as we move more of the product surface area over to support EAP/span-first/OTLP.