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

[pkg/otlp] Handle OTel semconv 1.17.0 in span tag conversion #16337

Merged
merged 3 commits into from
Mar 29, 2023

Conversation

songy23
Copy link
Member

@songy23 songy23 commented Mar 29, 2023

What does this PR do?

Add special handling for OTel semconv v1.17.0 in addition to v1.6.1 in OTel span ingestion. The only breaking change in v1.17.0 that impacts Agent OTLP ingestion is messaging.destination -> messaging.destination.name, all other attributes are a simply pass-through.

Motivation

To be compatible with newer version of OTel semconv while maintaining backwards compatiibility.

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Send a OTLP span with attributes messaging.operation and messaging.destination.name to Agent and check the DD span resource is set with the attribute values. E.g. a span with messaging.operation=process and messaging.destination.name=my-queue will have resource like process my-queue.

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

@songy23 songy23 requested review from a team as code owners March 29, 2023 14:31
@songy23 songy23 requested a review from liustanley March 29, 2023 14:31
@songy23 songy23 added this to the 7.45.0 milestone Mar 29, 2023
@songy23 songy23 added component/otlp PRs and issues related to OTLP ingest team/opentelemetry OpenTelemetry team labels Mar 29, 2023
Copy link
Contributor

@liustanley liustanley left a comment

Choose a reason for hiding this comment

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

LGTM, just one question/comment

pkg/trace/api/otlp_test.go Show resolved Hide resolved
@songy23 songy23 merged commit 47e3e53 into main Mar 29, 2023
@songy23 songy23 deleted the yang.song/otel-semconv branch March 29, 2023 19:41
mackjmr added a commit to mackjmr/opentelemetry-collector-contrib that referenced this pull request Apr 17, 2023
…/trace.

This PR updates `github.com/DataDog/datadog-agent/pkg/trace` to `v0.45.0-rc.1`.

**Context:** The following [PR](open-telemetry#20286) had pinned a pseudoversion of `github.com/DataDog/datadog-agent/pkg/trace` (`v0.44.0-rc.4.0.20230322085447-8b27e87df01c`) which was required in order to take advantages of the following [commit](DataDog/datadog-agent@8b27e87).

This was later updated by Dependabot from `v0.44.0-rc.4.0.20230322085447-8b27e87df01c` to `0.44.0-rc.5` in this [PR](open-telemetry#20486). `0.44.0-rc.5` does not contain changes from the required [commit](DataDog/datadog-agent@8b27e87) (milestone `7.45.0`).

This PR now re-adds the changes back by updating to `v0.45.0-rc.1`.

Because the latest release contains `github.com/DataDog/datadog-agent/pkg/trace` `v0.44.0-rc.5`, which does not contain the changes from the following [commit](DataDog/datadog-agent@8b27e87), this brings two issues:
- the span links change was not added in the latest release, but it was added to the release notes => This PR adds a `bug_fix` changelog to indicate this.
- in the latest release, the hostname preview logic is off by default, instead of on by default (due to the removal of the following [setting](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/20286/files#diff-9ca998552699e406631ae1a165fef81d5373ba6876136c8c48c10ae0355edf2aL179) which only works in combination of the  required [commit](DataDog/datadog-agent@8b27e87)) => This PR adds a `bug_fix` changelog to indicate this.

It also adds the changelog related to [PR1](DataDog/datadog-agent#16337) and [PR2](DataDog/datadog-agent#16430), which are brought in from the upgrade to `v0.45.0-rc.1`.
mx-psi pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Apr 17, 2023
…/trace. (#20923)

* exporter/datadogexporter: update github.com/DataDog/datadog-agent/pkg/trace.

This PR updates `github.com/DataDog/datadog-agent/pkg/trace` to `v0.45.0-rc.1`.

**Context:** The following [PR](#20286) had pinned a pseudoversion of `github.com/DataDog/datadog-agent/pkg/trace` (`v0.44.0-rc.4.0.20230322085447-8b27e87df01c`) which was required in order to take advantages of the following [commit](DataDog/datadog-agent@8b27e87).

This was later updated by Dependabot from `v0.44.0-rc.4.0.20230322085447-8b27e87df01c` to `0.44.0-rc.5` in this [PR](#20486). `0.44.0-rc.5` does not contain changes from the required [commit](DataDog/datadog-agent@8b27e87) (milestone `7.45.0`).

This PR now re-adds the changes back by updating to `v0.45.0-rc.1`.

Because the latest release contains `github.com/DataDog/datadog-agent/pkg/trace` `v0.44.0-rc.5`, which does not contain the changes from the following [commit](DataDog/datadog-agent@8b27e87), this brings two issues:
- the span links change was not added in the latest release, but it was added to the release notes => This PR adds a `bug_fix` changelog to indicate this.
- in the latest release, the hostname preview logic is off by default, instead of on by default (due to the removal of the following [setting](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/20286/files#diff-9ca998552699e406631ae1a165fef81d5373ba6876136c8c48c10ae0355edf2aL179) which only works in combination of the  required [commit](DataDog/datadog-agent@8b27e87)) => This PR adds a `bug_fix` changelog to indicate this.

It also adds the changelog related to [PR1](DataDog/datadog-agent#16337) and [PR2](DataDog/datadog-agent#16430), which are brought in from the upgrade to `v0.45.0-rc.1`.

* update wording

* add issue # to changelog

* Update .chloggen/datadog-semconv-1.17.yaml

Co-authored-by: Yang Song <[email protected]>

---------

Co-authored-by: Yang Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/otlp PRs and issues related to OTLP ingest team/opentelemetry OpenTelemetry team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants