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/)
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.
…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