Skip to content
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

[receiver/datadog][bug-fix] Add DD span metrics as attributes #35087

Conversation

lopes-felipe
Copy link
Contributor

Description:
Datadog divides the span's tags into two fields, meta for string values and metrics for numeric ones.

Currently, the receiver isn't considering the metrics field when building the OTel span's attributes, losing this metadata during the conversion. This PR fixes this issue.

Link to tracking Issue:

Testing:

Documentation:

@lopes-felipe
Copy link
Contributor Author

Test failing due to this unrelated issue.

@lopes-felipe
Copy link
Contributor Author

@jpkrohling @MovieStoreGuy, would you mind reviewing this? It's a pretty straightforward change. Thank you :)

Copy link
Member

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lopes-felipe
Copy link
Contributor Author

Thank you for the review @jpkrohling. Any chances we get this merged as well?

@jpkrohling jpkrohling merged commit 36b603d into open-telemetry:main Sep 19, 2024
155 of 156 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 19, 2024
@lopes-felipe lopes-felipe deleted the datadog-receiver/fix-span-attributes-bug branch October 1, 2024 21:02
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 2024
…-telemetry#35087)

**Description:** <Describe what has changed.>
Datadog [divides the span's
tags](https://github.com/DataDog/dd-trace-java/blob/master/dd-trace-core/src/main/java/datadog/trace/common/writer/ddagent/TraceMapperV0_5.java#L210-L212)
into [two
fields](https://github.com/DataDog/datadog-agent/blob/1739a048156d968bbe5fd8a1ace8e07c997d16d9/pkg/proto/datadog/trace/span.proto#L50-L55),
`meta` for string values and `metrics` for numeric ones.

Currently, the receiver isn't considering the `metrics` field when
building the OTel span's attributes, losing this metadata during the
conversion. This PR fixes this issue.

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>

---------

Co-authored-by: Sean Marciniak <30928402+MovieStoreGuy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants