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

[exporter/datadog] Add feature flag for updated operation and resourc… #36419

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

IbraheemA
Copy link
Contributor

@IbraheemA IbraheemA commented Nov 18, 2024

…e name logic

Description

Datadog associates two name fields with each span: "resource name" and "operation name." Resource name is analogous to span.name in OTel, but operation name has no 1:1 correspondence with any OTel fields. (Read more about what operation name respresents here: https://docs.datadoghq.com/tracing/guide/configuring-primary-operation/)

Previously, the datadog exporter would compute operation name as {scope name}.{span kind}. This would result in long, difficult to read operation names in the Datadog UI - a prior discussion on this issue can be found here.

In this PR, add a feature gate exporter.datadogexporter.EnableOperationAndResourceNameV2. This gate enables new logic for operation and resource name that improves readability of these fields by producing shorter names and better aligning with the OTel spec.

The names computed in the new logic follow those computed in dd-trace-go.

Testing

Unit tests and E2E tests for the new logic are done in the datadog-agent repo. Added a test in this repo that verifies that setting the feature gate enables the new logic; also ran the collector with the feature flag and verified new logic manually.

Documentation

Changelog added

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

Generated code is out of date, please run "make generate" and commit the changes in this PR.

component: datadogexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Add a feature gate exporter.datadogexporter.EnableOperationAndResourceNameV2. Enabling this gate modifies the logic for computing operation and resource names from OTLP spans to produce shorter, more readable names and improve alignment with OpenTelemetry specifications."
Copy link
Member

Choose a reason for hiding this comment

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

Is there a public doc that we can link here for customers to know exactly what changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet - should I write one up before I merge this?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, please coordinate with Anna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants