-
Notifications
You must be signed in to change notification settings - Fork 6
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-738: Add Custom Container Tag Support (datadog.container.tag prefix) #193
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mx-psi
reviewed
Nov 9, 2023
mx-psi
reviewed
Nov 9, 2023
mx-psi
approved these changes
Nov 9, 2023
Merged
mackjmr
added a commit
to DataDog/datadog-agent
that referenced
this pull request
Nov 10, 2023
…g.* namespace) This PR is a follow up to DataDog/opentelemetry-mapping-go#193 which adds support for custom container tags via resource attributes prefixed by `datadog.container.tag`. This PR also brings a couple other changes: - Stop extracting container tags from span attributes, but only extract from resource attributes. The semantic conventions we are using to extract the container tags are meant for resource attributes, so we should only check resource attributes. - Stop setting the DD Format container tags as span tags, but only set these in the dedicated container tag (_dd.container.tag). We currently set the DD mapped container tags both as span tag, and in the `_dd.tags.container`. This should only be set in `_dd.tags.container`. In fact container tags are treated differently than span tags (searchable without @, have a dedicated container tab in the UI...etc)
10 tasks
mackjmr
added a commit
to DataDog/datadog-agent
that referenced
this pull request
Nov 10, 2023
…g.* namespace) This PR is a follow up to DataDog/opentelemetry-mapping-go#193 which adds support for custom container tags via resource attributes prefixed by `datadog.container.tag`. This PR also brings a couple other changes: - Stop extracting container tags from span attributes, but only extract from resource attributes. The semantic conventions we are using to extract the container tags are meant for resource attributes, so we should only check resource attributes. - Stop setting the DD Format container tags as span tags, but only set these in the dedicated container tag (_dd.container.tag). We currently set the DD mapped container tags both as span tag, and in the `_dd.tags.container`. This should only be set in `_dd.tags.container`. In fact container tags are treated differently than span tags (searchable without @, have a dedicated container tab in the UI...etc)
mackjmr
added a commit
to DataDog/datadog-agent
that referenced
this pull request
Nov 10, 2023
…g.* namespace) (#20779) * OTEL-738: Add support for custom container tags (datadog.container.tag.* namespace) This PR is a follow up to DataDog/opentelemetry-mapping-go#193 which adds support for custom container tags via resource attributes prefixed by `datadog.container.tag`. This PR also brings a couple other changes: - Stop extracting container tags from span attributes, but only extract from resource attributes. The semantic conventions we are using to extract the container tags are meant for resource attributes, so we should only check resource attributes. - Stop setting the DD Format container tags as span tags, but only set these in the dedicated container tag (_dd.container.tag). We currently set the DD mapped container tags both as span tag, and in the `_dd.tags.container`. This should only be set in `_dd.tags.container`. In fact container tags are treated differently than span tags (searchable without @, have a dedicated container tab in the UI...etc) * fix release note syntax * Update releasenotes/notes/apm-otlp-custom-container-tags-66f1878743f9f7ca.yaml Co-authored-by: Alicia Scott <[email protected]> --------- Co-authored-by: Alicia Scott <[email protected]>
This was referenced Nov 13, 2023
mackjmr
added a commit
to mackjmr/opentelemetry-collector-contrib
that referenced
this pull request
Nov 13, 2023
This PR updates `github.com/DataDog/datadog-agent/pkg/trace` and `github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes`. This brings in the following PRs: DataDog/opentelemetry-mapping-go#193, DataDog/opentelemetry-mapping-go#174 which add support for custom container tags (for traces, metrics and logs) via resource attributes prefixed by `datadog.container.tag.*`. This PR also brings a couple other changes for traces which are reflected in the changelog: - Stop extracting container tags from span attributes, but only extract from resource attributes. The semantic conventions we are using to extract the container tags are meant for resource attributes, so we should only check resource attributes. - Stop setting the DD Format container tags as span tags, but only set these in the dedicated container tag (_dd.container.tag). We currently set the DD mapped container tags both as span tag, and in the dedicated container tag `_dd.tags.container`. This should only be set in the dedicated container tag. The update to opentelemetry-mapping-go also brings in this change: DataDog/opentelemetry-mapping-go#174, which adds support for `host.cpu.*` attributes.
mackjmr
added a commit
to mackjmr/opentelemetry-collector-contrib
that referenced
this pull request
Nov 13, 2023
…-telemetry#29154 This PR updates `github.com/DataDog/datadog-agent/pkg/trace` and `github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes`. This brings in the following PRs: DataDog/opentelemetry-mapping-go#193, DataDog/opentelemetry-mapping-go#174 which add support for custom container tags (for traces, metrics and logs) via resource attributes prefixed by `datadog.container.tag.*`. This PR also brings a couple other changes for traces which are reflected in the changelog: - Stop extracting container tags from span attributes, but only extract from resource attributes. The semantic conventions we are using to extract the container tags are meant for resource attributes, so we should only check resource attributes. - Stop setting the DD Format container tags as span tags, but only set these in the dedicated container tag (`_dd.container.tag`). We currently set the DD mapped container tags both as span tag, and in the dedicated container tag `_dd.tags.container`. This should only be set in the dedicated container tag. The update to opentelemetry-mapping-go also brings in this change: DataDog/opentelemetry-mapping-go#174, which adds support for `host.cpu.*` attributes.
mackjmr
added a commit
to DataDog/opentelemetry-collector-contrib
that referenced
this pull request
Nov 13, 2023
This PR pulls in this change: DataDog/datadog-agent#20779 and this change DataDog/opentelemetry-mapping-go#193 which add custom container tagging support for traces, metrics and logs.
mx-psi
pushed a commit
to open-telemetry/opentelemetry-collector-contrib
that referenced
this pull request
Nov 14, 2023
) **Description:** This PR updates `github.com/DataDog/datadog-agent/pkg/trace` and `github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes`. This brings in the following PRs: DataDog/opentelemetry-mapping-go#193, DataDog/datadog-agent#20779 which add support for custom container tags (for traces, metrics and logs) via resource attributes prefixed by `datadog.container.tag.*`. This PR also brings a couple other changes for traces which are reflected in the changelog: - Stop extracting container tags from span attributes, but only extract from resource attributes. The semantic conventions we are using to extract the container tags are meant for resource attributes, so we should only check resource attributes. - Stop setting the DD Format container tags as span tags, but only set these in the dedicated container tag (`_dd.container.tag`). We currently set the DD mapped container tags both as span tag, and in the dedicated container tag `_dd.tags.container`. This should only be set in the dedicated container tag. The update to opentelemetry-mapping-go also brings in this change: DataDog/opentelemetry-mapping-go#174, which adds support for `host.cpu.*` attributes.
RoryCrispin
pushed a commit
to ClickHouse/opentelemetry-collector-contrib
that referenced
this pull request
Nov 24, 2023
…n-telemetry#29156) **Description:** This PR updates `github.com/DataDog/datadog-agent/pkg/trace` and `github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes`. This brings in the following PRs: DataDog/opentelemetry-mapping-go#193, DataDog/datadog-agent#20779 which add support for custom container tags (for traces, metrics and logs) via resource attributes prefixed by `datadog.container.tag.*`. This PR also brings a couple other changes for traces which are reflected in the changelog: - Stop extracting container tags from span attributes, but only extract from resource attributes. The semantic conventions we are using to extract the container tags are meant for resource attributes, so we should only check resource attributes. - Stop setting the DD Format container tags as span tags, but only set these in the dedicated container tag (`_dd.container.tag`). We currently set the DD mapped container tags both as span tag, and in the dedicated container tag `_dd.tags.container`. This should only be set in the dedicated container tag. The update to opentelemetry-mapping-go also brings in this change: DataDog/opentelemetry-mapping-go#174, which adds support for `host.cpu.*` attributes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR deprecates
ContainerTagFromAttributes
in favor ofContainerTagFromResourceAttributes
which accepts apcommon.Map
and is now called for metrics, logs and traces.ContainerTagFromResourceAttributes
not only checks semantic conventions for container tags, but also checks resource attributes which are prefixed bydatadog.container.tag.
.Previously,
ContainerTagFromAttributes
was called by traces here.ContainerTagFromResourceAttributes
accepting apcommon.Map
has a couple implications for tracing:_dd.tags.container
)._dd.tags.container
is the intended place for container tags so they can be searched without a @, so there is no need to also set these as span tag (searchable with @).Motivation
OTEL-738