diff --git a/manifests/cpp.yml b/manifests/cpp.yml index 6bef94170dc..2c7a94acb11 100644 --- a/manifests/cpp.yml +++ b/manifests/cpp.yml @@ -245,7 +245,6 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR05_Sampling_Independence: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes: missing_feature - tests/parametric/test_otlp_trace_metrics.py::Test_FR07_Otel_Semantics_Mode: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation: missing_feature diff --git a/manifests/dotnet.yml b/manifests/dotnet.yml index bd5c981052b..7fb1ca12d51 100644 --- a/manifests/dotnet.yml +++ b/manifests/dotnet.yml @@ -1029,11 +1029,12 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes::test_fr06_15_default_service_on_data_point: missing_feature (service.name is omitted from the data point when the span uses the configured default service) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_2_span_kind: missing_feature (span.kind is emitted as the raw Datadog value, e.g. "server", not the SMC's SPAN_KIND_* convention) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_8_status_code_error: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_12_stats_additional_tags: missing_feature (DD_TRACE_STATS_ADDITIONAL_TAGS is not yet emitted as additional_metric_tags on OTLP trace metrics data points) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (datadog.is_trace_root is computed but never emitted on OTLP trace metrics data points) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_tracer_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env_tracer_tags: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_12_stats_additional_tags: missing_feature (pending implementation release) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (pending implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_14_peer_tags: missing_feature (Blocked on test-agent support for advertising a peer_tags allowlist in /info) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_15_service_source: missing_feature (pending implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_8_process_tags: missing_feature (process tags are not yet emitted on the OTLP trace metrics resource) tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation::test_fr09_2_error_count: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention, so the error span is not counted) tests/parametric/test_otlp_trace_metrics.py::Test_FR15_Client_Computed_Stats_Header::test_fr15_1_header_set_when_enabled: irrelevant (OTLP trace metrics alongside native (non-OTLP) trace export was removed and will not be supported; OTLP trace metrics now require OTEL_TRACES_EXPORTER=otlp) diff --git a/manifests/golang.yml b/manifests/golang.yml index 5fc7f4594a1..f08c4d4f2de 100644 --- a/manifests/golang.yml +++ b/manifests/golang.yml @@ -1537,9 +1537,11 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes::test_fr06_15_default_service_on_data_point: missing_feature (default service not on data point) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_2_span_kind: missing_feature (span.kind is emitted as the raw Datadog value, e.g. "server", not the SMC's SPAN_KIND_* convention) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_8_status_code_error: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags: missing_feature (datadog.tracer_tags / DD_TRACE_STATS_ADDITIONAL_TAGS per-key attrs not yet implemented) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (datadog.is_trace_root not emitted) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_tracer_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env_tracer_tags: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (pending implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_14_peer_tags: missing_feature (Blocked on test-agent support for advertising a peer_tags allowlist in /info) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_15_service_source: missing_feature (pending implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_8_process_tags: missing_feature (process_tags is split into per-key datadog. resource attributes instead of one combined datadog.process_tags arrayValue) tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation::test_fr09_2_error_count: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention, so the error span is not counted) tests/parametric/test_parametric_endpoints.py::TestRemoteConfigApplyEndpoint: incomplete_test_app (POST /trace/remote-config/apply only implemented in the python parametric app) diff --git a/manifests/java.yml b/manifests/java.yml index c890813eb2f..c53b19aae7d 100644 --- a/manifests/java.yml +++ b/manifests/java.yml @@ -3993,9 +3993,11 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes::test_fr06_15_default_service_on_data_point: missing_feature (service.name is omitted from the data point when the span uses the configured default service) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_2_span_kind: missing_feature (span.kind is emitted as the raw Datadog value, e.g. "server", not the SMC's SPAN_KIND_* convention) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_8_status_code_error: missing_feature (status.code is emitted as the bare string "ERROR" instead of the SMC's STATUS_CODE_ERROR convention, and is omitted entirely for non-error spans) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags: missing_feature (DD_TAGS/OTEL_RESOURCE_ATTRIBUTES are not yet emitted as the datadog.tracer_tags resource attribute; support coming in a future PR) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (datadog.is_trace_root is computed but never emitted on OTLP trace metrics data points) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_tracer_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env_tracer_tags: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (pending implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_14_peer_tags: missing_feature (Blocked on test-agent support for advertising a peer_tags allowlist in /info) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_15_service_source: missing_feature (pending implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_8_process_tags: missing_feature (process_tags is split into per-key datadog. resource attributes instead of one combined datadog.process_tags arrayValue) tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation::test_fr09_2_error_count: missing_feature (status.code is emitted as the bare string "ERROR" instead of the SMC's STATUS_CODE_ERROR convention, so the error span is not counted) tests/parametric/test_parametric_endpoints.py::TestRemoteConfigApplyEndpoint: incomplete_test_app (POST /trace/remote-config/apply only implemented in the python parametric app) diff --git a/manifests/nodejs.yml b/manifests/nodejs.yml index 9f80f37845e..b8053404a7f 100644 --- a/manifests/nodejs.yml +++ b/manifests/nodejs.yml @@ -2389,11 +2389,12 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes::test_fr06_15_default_service_on_data_point: missing_feature (service.name is omitted from the data point when the span uses the configured default service) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_2_span_kind: missing_feature (span.kind is emitted as the raw Datadog value, e.g. "server", not the SMC's SPAN_KIND_* convention) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_8_status_code_error: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_tracer_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env_tracer_tags: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_12_stats_additional_tags: missing_feature (DD_TRACE_STATS_ADDITIONAL_TAGS is not forwarded to the native OTLP trace-metrics exporter) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (datadog.is_trace_root is not yet emitted on OTLP trace-metric data points) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_14_peer_tags: missing_feature (Blocked on test-agent support for advertising a peer_tags allowlist in /info) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_15_service_source: missing_feature (pending implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_5_top_level_child_different_service: missing_feature (nodejs does not tag child spans with a different service than their parent as top-level) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_8_process_tags: missing_feature (process_tags is split into per-key datadog. resource attributes instead of one combined datadog.process_tags arrayValue) tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation::test_fr09_2_error_count: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention, so the error span is not counted) diff --git a/manifests/php.yml b/manifests/php.yml index fcf85ab4e7c..5a44e2dc4fc 100644 --- a/manifests/php.yml +++ b/manifests/php.yml @@ -1171,7 +1171,6 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR05_Sampling_Independence: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes: missing_feature - tests/parametric/test_otlp_trace_metrics.py::Test_FR07_Otel_Semantics_Mode: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation: missing_feature diff --git a/manifests/python.yml b/manifests/python.yml index df40ace7d0e..b313863a3ae 100644 --- a/manifests/python.yml +++ b/manifests/python.yml @@ -2062,11 +2062,12 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_2_span_kind: missing_feature (span.kind is emitted as the raw Datadog value, e.g. "server", not the SMC's SPAN_KIND_* convention) tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_7_rpc_status_code: v4.14.0-dev tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes::test_fr06_8_status_code_error: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) - tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_10_dd_tags_tracer_tags_resource_attributes: missing_feature (DD_TAGS is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_11_otel_resource_attributes_env_tracer_tags: missing_feature (OTEL_RESOURCE_ATTRIBUTES is not yet reported as datadog.tracer_tags on the OTLP trace metrics resource) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags::test_fr08_12_stats_additional_tags: missing_feature (DD_TRACE_STATS_ADDITIONAL_TAGS is not forwarded to the native OTLP trace-metrics exporter) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_13_is_trace_root: missing_feature (datadog.is_trace_root is emitted as _datadog.is_trace_root, with a leading underscore) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_14_peer_tags: missing_feature (Blocked on test-agent support for advertising a peer_tags allowlist in /info) + tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_15_service_source: missing_feature (pending libdatadog implementation release) tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes::test_fr08_8_process_tags: missing_feature (process_tags is split into per-key datadog. resource attributes instead of one combined datadog.process_tags arrayValue) tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation::test_fr09_2_error_count: missing_feature (status.code is emitted as an integer, e.g. 2, not the SMC's STATUS_CODE_ERROR string convention, so the error span is not counted) tests/parametric/test_parametric_endpoints.py::Test_Parametric_DDTrace_Baggage: v2.16.0 diff --git a/manifests/ruby.yml b/manifests/ruby.yml index 3520979b89d..115925750e6 100644 --- a/manifests/ruby.yml +++ b/manifests/ruby.yml @@ -2515,7 +2515,6 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR05_Sampling_Independence: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes: missing_feature - tests/parametric/test_otlp_trace_metrics.py::Test_FR07_Otel_Semantics_Mode: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation: missing_feature diff --git a/manifests/rust.yml b/manifests/rust.yml index 9de297d82fb..7fc8dc4f4b1 100644 --- a/manifests/rust.yml +++ b/manifests/rust.yml @@ -276,7 +276,6 @@ manifest: tests/parametric/test_otlp_trace_metrics.py::Test_FR05_Sampling_Independence: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Resource_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR06_Otel_Span_Attributes: missing_feature - tests/parametric/test_otlp_trace_metrics.py::Test_FR07_Otel_Semantics_Mode: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_AdditionalTags: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR08_Datadog_Attributes: missing_feature tests/parametric/test_otlp_trace_metrics.py::Test_FR09_Red_Metric_Derivation: missing_feature diff --git a/tests/parametric/test_otlp_trace_metrics.py b/tests/parametric/test_otlp_trace_metrics.py index 964eeb0a052..bab1f18630e 100644 --- a/tests/parametric/test_otlp_trace_metrics.py +++ b/tests/parametric/test_otlp_trace_metrics.py @@ -13,9 +13,8 @@ FR05 Computed before head-based sampling Test_FR05_Sampling_Independence FR06 OTel semantic-convention attributes wherever applicable Test_FR06_Otel_Span_Attributes, Test_FR06_Otel_Resource_Attributes - FR07 DD_TRACE_OTEL_SEMANTICS_ENABLED=true -> only OTel attributes Test_FR07_Otel_Semantics_Mode - FR08 DD_TRACE_OTEL_SEMANTICS_ENABLED=false (default) -> datadog.* allowed Test_FR08_Datadog_Attributes, - DD_TRACE_STATS_ADDITIONAL_TAGS (additional_metric_tags) Test_FR08_AdditionalTags + FR08 Datadog attributes and DD_TRACE_STATS_ADDITIONAL_TAGS Test_FR08_Datadog_Attributes, + (additional_metric_tags) Test_FR08_AdditionalTags FR09 Derive request/span count, error count, and duration Test_FR09_Red_Metric_Derivation FR10 Transport over OTLP HTTP/JSON (set in _BASE_ENVVARS, exercised by every test) FR11 SDKs without client-side stats are out of scope (handled by manifests / @features gating) @@ -25,9 +24,8 @@ Key conventions: * Top-level marker is datadog.span.top_level. - * Error is conveyed via the OTel status.code attribute; it works in OTel-semantics mode where datadog.* and - other bespoke attributes are disallowed. - * Resource name is the OTel span.name attribute in both modes; datadog.resource.name is not emitted. + * Error is conveyed via the OTel status.code attribute. + * Resource name is the OTel span.name attribute; datadog.resource.name is not emitted. * The emitter is identified by the resource attributes telemetry.sdk.name ("datadog") and telemetry.sdk.language (the library's OTel language token, e.g. "go" for golang). * service.name, service.version and deployment.environment.name are reported as resource attributes @@ -127,8 +125,7 @@ def _get_otlp_metrics_protocol() -> str: "DD_SERVICE": SERVICE, } -# OTLP trace metrics explicitly enabled. DD_TRACE_OTEL_SEMANTICS_ENABLED is unset, so this is the -# default Datadog mode where datadog.* attributes are emitted alongside OTel attributes (FR08). +# OTLP trace metrics explicitly enabled. DEFAULT_ENVVARS = {**_BASE_ENVVARS, "OTEL_TRACES_SPAN_METRICS_ENABLED": "true"} # Same as DEFAULT_ENVVARS, but also exercises the OTLP trace export path (OTEL_TRACES_EXPORTER=otlp). @@ -137,9 +134,6 @@ def _get_otlp_metrics_protocol() -> str: # otlp_traces_and_metrics_library_env fixture below. DEFAULT_ENVVARS_OTLP = {**DEFAULT_ENVVARS, "OTEL_TRACES_EXPORTER": "otlp"} -# OTel-semantics mode: only OpenTelemetry attributes are emitted, no datadog.* attributes (FR07). -OTEL_SEMANTICS_ENVVARS_OTLP = {**DEFAULT_ENVVARS_OTLP, "DD_TRACE_OTEL_SEMANTICS_ENABLED": "true"} - @pytest.fixture def otlp_trace_metrics_library_env(library_env: dict[str, str], test_agent: TestAgentAPI): @@ -433,7 +427,7 @@ def test_fr01_5_disabled_when_tracing_is_disabled( # flush window and fail if the span-duration trace metric ever appears. deadline = time.monotonic() + 8 while time.monotonic() < deadline: - metrics = test_agent.metrics() + metrics = _normalize_keys(test_agent.metrics()) assert not _duration_data_points(metrics), ( f"OTLP trace metrics must be disabled when OTLP trace export is off, got: {_all_metric_names(metrics)}" ) @@ -459,7 +453,7 @@ def test_fr01_6_disabled_when_apm_tracing_disabled( deadline = time.monotonic() + 8 while time.monotonic() < deadline: - metrics = test_agent.metrics() + metrics = _normalize_keys(test_agent.metrics()) assert not _duration_data_points(metrics), ( f"OTLP trace metrics must be disabled when APM tracing is disabled, got: {_all_metric_names(metrics)}" ) @@ -712,7 +706,7 @@ def test_fr05_1_metrics_computed_before_sampling( @scenarios.parametric @features.client_side_stats_supported class Test_FR06_Otel_Span_Attributes: - """FR06: Span dimensions map to OTel semantic-convention data-point attributes (both modes).""" + """FR06: Span dimensions map to OTel semantic-convention data-point attributes.""" @pytest.mark.parametrize("library_env", [{**DEFAULT_ENVVARS_OTLP}]) def test_fr06_1_resource_span_name( @@ -1017,95 +1011,10 @@ def test_fr06_13_telemetry_sdk_language( ) -@scenarios.parametric -@features.client_side_stats_supported -class Test_FR07_Otel_Semantics_Mode: - """FR07: With DD_TRACE_OTEL_SEMANTICS_ENABLED=true, only OTel attributes are emitted.""" - - @pytest.mark.parametrize("library_env", [{**OTEL_SEMANTICS_ENVVARS_OTLP}]) - def test_fr07_1_no_datadog_attributes( - self, - otlp_traces_and_metrics_library_env: dict[str, str], # noqa: ARG002 - test_agent: TestAgentAPI, - test_library: APMLibrary, - ): - """No datadog.* prefixed attributes are emitted on the data point in OTel-semantics mode.""" - with test_library as t: - with t.dd_start_span(name="web.request", service=SERVICE, resource="/users", typestr="web") as span: - span.set_meta(ORIGIN, "synthetics") - t.dd_flush() - - metrics = _wait_for_otlp_metrics(test_agent) - attrs = _data_point_attrs(_duration_data_points(metrics)[0]) - datadog_keys = [key for key in attrs if key.startswith(("datadog.", "_datadog."))] - assert not datadog_keys, f"datadog.* attributes must not be emitted in OTel-semantics mode: {datadog_keys}" - - @pytest.mark.parametrize("library_env", [{**OTEL_SEMANTICS_ENVVARS_OTLP}]) - def test_fr07_2_no_datadog_resource_or_type( - self, - otlp_traces_and_metrics_library_env: dict[str, str], # noqa: ARG002 - test_agent: TestAgentAPI, - test_library: APMLibrary, - ): - """Resource is carried by span.name (not datadog.resource.name) and datadog.span.type is absent.""" - with test_library as t: - with t.dd_start_span(name="web.request", service=SERVICE, resource="/users", typestr="web"): - pass - t.dd_flush() - - metrics = _wait_for_otlp_metrics(test_agent) - attrs = _data_point_attrs(_duration_data_points(metrics)[0]) - assert attrs.get("span.name") == "/users", f"Expected span.name=/users, got attrs: {attrs}" - assert "datadog.resource.name" not in attrs, f"datadog.resource.name must be absent: {attrs}" - assert "datadog.span.type" not in attrs, f"datadog.span.type must be absent: {attrs}" - assert "datadog.operation.name" not in attrs, f"datadog.operation.name must be absent: {attrs}" - - @pytest.mark.parametrize("library_env", [{**OTEL_SEMANTICS_ENVVARS_OTLP}]) - def test_fr07_3_otel_attributes_present( - self, - otlp_traces_and_metrics_library_env: dict[str, str], # noqa: ARG002 - test_agent: TestAgentAPI, - test_library: APMLibrary, - ): - """OTel semantic-convention attributes are still emitted in OTel-semantics mode.""" - with test_library as t: - with t.dd_start_span(name="web.request", service=SERVICE, typestr="web") as span: - span.set_meta("http.method", "GET") - span.set_meta("http.route", "/users/{id}") - t.dd_flush() - - metrics = _wait_for_otlp_metrics(test_agent) - attrs = _data_point_attrs(_duration_data_points(metrics)[0]) - assert attrs.get("http.request.method") == "GET", f"Expected http.request.method=GET, got attrs: {attrs}" - assert attrs.get("http.route") == "/users/{id}", f"Expected http.route=/users/{{id}}, got attrs: {attrs}" - - @pytest.mark.parametrize( - "library_env", - [{**OTEL_SEMANTICS_ENVVARS_OTLP, "DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED": "true"}], - ) - def test_fr07_4_no_datadog_resource_attributes( - self, - otlp_traces_and_metrics_library_env: dict[str, str], # noqa: ARG002 - test_agent: TestAgentAPI, - test_library: APMLibrary, - ): - """No datadog.* resource attributes are emitted in OTel-semantics mode (process tags must not leak).""" - with test_library as t: - with t.dd_start_span(name="web.request", service=SERVICE, typestr="web"): - pass - t.dd_flush() - - metrics = _wait_for_otlp_metrics(test_agent) - datadog_keys = [key for key in _resource_attributes(metrics) if key.startswith(("datadog.", "_datadog."))] - assert not datadog_keys, ( - f"datadog.* resource attributes must not be emitted in OTel-semantics mode: {datadog_keys}" - ) - - @scenarios.parametric @features.client_side_stats_supported class Test_FR08_Datadog_Attributes: - """FR08: In default mode (DD_TRACE_OTEL_SEMANTICS_ENABLED=false) datadog.* attributes are added.""" + """FR08: Datadog span dimensions map to datadog.* attributes.""" @pytest.mark.parametrize("library_env", [{**DEFAULT_ENVVARS_OTLP}]) def test_fr08_1_operation_name( @@ -1343,13 +1252,17 @@ def test_fr08_13_is_trace_root( service_entry_point = _find_data_point(points, **{"datadog.operation.name": "postgres.query"}) assert service_entry_point is not None, "No data point for the service-entry child span" service_entry_attrs = _data_point_attrs(service_entry_point) - assert service_entry_attrs.get("datadog.span.top_level") is True, ( + assert service_entry_attrs.get("datadog.span.top_level") in (True, 1), ( f"Expected datadog.span.top_level=true on the service-entry child: {service_entry_attrs}" ) assert service_entry_attrs.get("datadog.is_trace_root") is False, ( f"A service-entry child is not the trace root; expected datadog.is_trace_root=false: {service_entry_attrs}" ) + @pytest.mark.parametrize( + "agent_env", + [{"DD_AGENT_EXTRA_INFO": json.dumps({"peer_tags": ["db.hostname"]})}], + ) @pytest.mark.parametrize("library_env", [{**DEFAULT_ENVVARS_OTLP}]) def test_fr08_14_peer_tags( self, @@ -1362,7 +1275,9 @@ def test_fr08_14_peer_tags( the Agent's peer_tags allowlist covers (e.g. db.hostname, aws.s3.bucket, grpc.target). """ with test_library as t: + assert t.ensure_agent_info(), "Tracer did not consume the Agent /info response" with t.dd_start_span(name="postgres.query", service="postgres", typestr="db") as span: + span.set_meta("span.kind", "client") span.set_meta("db.hostname", "prod-db-1") t.dd_flush() @@ -1371,6 +1286,25 @@ def test_fr08_14_peer_tags( peer_tags = attrs.get("datadog.peer_tags") or [] assert "db.hostname:prod-db-1" in peer_tags, f"Expected db.hostname:prod-db-1 in datadog.peer_tags: {attrs}" + @pytest.mark.parametrize("library_env", [{**DEFAULT_ENVVARS_OTLP, "DD_SERVICE": "default-service"}]) + def test_fr08_15_service_source( + self, + otlp_traces_and_metrics_library_env: dict[str, str], # noqa: ARG002 + test_agent: TestAgentAPI, + test_library: APMLibrary, + ): + """The service override source maps to the string attribute datadog.svc_src.""" + with test_library as t: + with t.dd_start_span(name="mapped.request", service="mapped-service", typestr="web"): + pass + t.dd_flush() + + metrics = _wait_for_otlp_metrics(test_agent) + point = _find_data_point(_duration_data_points(metrics), **{"datadog.operation.name": "mapped.request"}) + assert point is not None, "No data point for the service-override span" + attrs = _data_point_attrs(point) + assert "datadog.svc_src" in attrs, f"Expected datadog.svc_src to be set, got attrs: {attrs}" + @scenarios.parametric @features.client_side_stats_supported @@ -1392,7 +1326,7 @@ class Test_FR08_AdditionalTags: } ], ) - def test_fr08_10_dd_tags_resource_attributes( + def test_fr08_10_dd_tags_tracer_tags_resource_attributes( self, otlp_traces_and_metrics_library_env: dict[str, str], # noqa: ARG002 test_agent: TestAgentAPI, @@ -1424,7 +1358,7 @@ def test_fr08_10_dd_tags_resource_attributes( "library_env", [{**DEFAULT_ENVVARS_OTLP, "OTEL_RESOURCE_ATTRIBUTES": "team=apm,deployment.region=us-east-1"}], ) - def test_fr08_11_otel_resource_attributes_env( + def test_fr08_11_otel_resource_attributes_env_tracer_tags( self, otlp_traces_and_metrics_library_env: dict[str, str], # noqa: ARG002 test_agent: TestAgentAPI, @@ -1447,7 +1381,16 @@ def test_fr08_11_otel_resource_attributes_env( @pytest.mark.parametrize( "library_env", - [{**DEFAULT_ENVVARS_OTLP, "DD_TRACE_STATS_ADDITIONAL_TAGS": "customer.tier,region"}], + [ + { + **DEFAULT_ENVVARS_OTLP, + # Go uses a Boolean gate; other tracers list the experimental feature by name. + "DD_TRACE_STATS_ADDITIONAL_TAGS": "customer.tier,region", + "DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED": ( + "true" if context.library.name == "golang" else "DD_TRACE_STATS_ADDITIONAL_TAGS" + ), + } + ], ) def test_fr08_12_stats_additional_tags( self,