-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[OTEL-2370] add Span.Type tables for otel #27143
base: master
Are you sure you want to change the base?
Conversation
@IbraheemA I didn't add a table for Resource Name logic although I can if you'd like, only specific to db.system types since I know a lot of other things are in the works. |
Preview links (active after the
|
@@ -105,6 +105,78 @@ Additional cloud provider-specific attributes are also mapped. | |||
| `url.full` | `http.url` | | |||
| `user_agent.original` | `http.useragent` | | |||
|
|||
## Span Type mapping |
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.
are there unintuitive locations in the app that will look different depending on whether you set this correctly or not?
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.
if I understand correctly, we may be filtering service type based on this attribute (left sidebar, "select a component", "systems", "datastores" for example).
Otherwise I believe it's mainly the "type" attribute in trace explorer etc.
Just pinged (pung?) apm-app to ask https://dd.slack.com/archives/CBGCZ9P5Y/p1737038147661419
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.
apparently span.type is used to filter special spans like RUM, CI, etc. I'm not sure about the question about unintuitive locations that will look different; asked a follow-up question
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.
@mrakhman provided some helpful context in that thread
Based on the attributes included in your span, Datadog Agent and Datadog OpenTelemetry Components will attempt to infer the appropriate span type for better compatibility with other Datadog services. You may also explicitly set `span.type` attribute on any given span to override this logic using an [attributes][5] or [transform][6] processor, as well as by setting appropriate configuration values in OTel SDKs. | ||
|
||
### OTel Span Attributes -> Datadog Span Type | ||
The following table shows the Span Type mapping logic that is used if feature flag `enable_receive_resource_spans_v2` is set. The chart is in order of precedence. |
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.
It would be great to point out where the enable_receive_resource_spans_v2
needs to be enabled.
Is that on the OTel Collector?
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.
its in either Agent or in OTel Collector. Good point, I can add that info. @IbraheemA is there a blog post for this flag or only for the OperationAndResourceNameV2?
dfaf718
to
d19f464
Compare
7127375
to
bdf3c49
Compare
Based on the attributes included in your span, the Datadog Agent and Datadog OpenTelemetry components attempt to infer the appropriate span type for better compatibility with other Datadog services. You may also explicitly set the `span.type` attribute on any given span to override this logic using an [attributes][5] or a [transform][6] processor, as well as by setting appropriate configuration values in OpenTelemetry SDKs. | ||
|
||
### Map OpenTelemetry span attribute to Datadog span type | ||
The following table shows the span type mapping logic that is used if the feature flag `enable_receive_resource_spans_v2` is set in the Datadog Agent or the Datadog Exporter. The chart lists mappings in order of precedence. |
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've checked on the Collector-Contrib repo and I saw that the FF is available for DD Exporter and DD Connector:
https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-collector-contrib%20enable_receive_resource_spans_v2&type=code
Does the flag need to be enabled in both components?
I guess so, right?!
Otherwise we may calculate APM stats wrongly.
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.
yes, you're right. thank you. I will fix.
What does this PR do? What is the motivation?
Add explanation for Span Type logic applied to OTel spans. Remove the "black box" from our approach
Merge instructions
Will comment when ready to merge
Merge readiness:
Merge queue is enabled in this repo. To have it automatically merged after it receives the required reviews, create the PR (from a branch that follows the
<yourname>/description
naming convention) and then add the following PR comment:Additional notes