Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,8 @@ manifest:
tests/test_otel_http_semantics.py::Test_OtelSemantics_SamplingRules: missing_feature (HTTP server span names use Datadog semantics when sampling rules run)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Client: v3.52.0
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server: missing_feature (OTel HTTP server semantics not implemented over OTLP export)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: missing_feature (OTel HTTP server semantics not implemented over OTLP export)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_resource_renaming: irrelevant (The .NET tracer creates http.endpoint from routed AppSec requests)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForwardInboundOtUnchanged: missing_feature (APMAPI-2171)
Expand Down
1 change: 1 addition & 0 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,7 @@ manifest:
tests/test_otel_http_semantics.py::Test_OtelSemantics_SamplingRules: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Client: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: irrelevant (The AppSec endpoint retention request is specific to .NET)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh:
- weblog_declaration:
Expand Down
1 change: 1 addition & 0 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4607,6 +4607,7 @@ manifest:
tests/test_otel_http_semantics.py::Test_OtelSemantics_SamplingRules: missing_feature (OTLP export of OTel HTTP semantics not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Client: missing_feature (OTel HTTP semantics not implemented over both Agent and OTLP export paths)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server: missing_feature (OTel HTTP semantics not implemented over both Agent and OTLP export paths)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: irrelevant (The AppSec endpoint retention request is specific to .NET)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForwardInboundOtUnchanged: missing_feature (APMAPI-2171)
Expand Down
3 changes: 2 additions & 1 deletion manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2906,7 +2906,8 @@ manifest:
- weblog_declaration:
"*": missing_feature
express4: *ref_6_0_0
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained: missing_feature (http.endpoint is not retained under OTel semantics)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: irrelevant (The AppSec endpoint retention request is specific to .NET)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_resource_renaming: missing_feature (http.endpoint is not retained under OTel semantics)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForwardInboundOtUnchanged: # TODO: a lower version might be supported
Expand Down
1 change: 1 addition & 0 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,7 @@ manifest:
tests/test_otel_http_semantics.py::Test_OtelSemantics_SamplingRules: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Client: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: irrelevant (The AppSec endpoint retention request is specific to .NET)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForwardInboundOtUnchanged: missing_feature (APMAPI-2171)
Expand Down
3 changes: 3 additions & 0 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2446,9 +2446,12 @@ manifest:
? tests/test_otel_http_semantics.py::Test_OtelSemantics_OTLP_Spans_Http_ErrorStatusConfiguration::test_client_error_statuses_config_overrides
: missing_feature (DD_TRACE_HTTP_CLIENT_ERROR_STATUSES support is outside the current Python OTel semantics implementation scope)
tests/test_otel_http_semantics.py::Test_OtelSemantics_OTLP_TraceMetrics: 4.15.0-dev
tests/test_otel_http_semantics.py::Test_OtelSemantics_OTLP_TraceMetrics::test_trace_metric_agrees_with_client_success: missing_feature (libdatadog status.code fix is not merged)
tests/test_otel_http_semantics.py::Test_OtelSemantics_OTLP_TraceMetrics::test_trace_metric_agrees_with_server_success: missing_feature (libdatadog status.code fix is not merged)
tests/test_otel_http_semantics.py::Test_OtelSemantics_SamplingRules: 4.15.0-dev
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Client: 4.15.0-dev
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server: 4.15.0-dev
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: irrelevant (The AppSec endpoint retention request is specific to .NET)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh: missing_feature (APMAPI-2171)
tests/test_otel_tracestate_sampling.py::Test_ForwardInboundOtUnchanged: missing_feature (APMAPI-2171)
Expand Down
1 change: 1 addition & 0 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3005,6 +3005,7 @@ manifest:
tests/test_otel_http_semantics.py::Test_OtelSemantics_SamplingRules: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Client: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: irrelevant (The AppSec endpoint retention request is specific to .NET)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: v2.42.0-dev
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh: v2.42.0-dev
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh::test_force_keep_overrides_inherited_drop_decision: v2.42.0-dev
Expand Down
1 change: 1 addition & 0 deletions manifests/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ manifest:
tests/test_otel_http_semantics.py::Test_OtelSemantics_SamplingRules: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Client: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server: missing_feature (DD_TRACE_OTEL_SEMANTICS_ENABLED not implemented)
tests/test_otel_http_semantics.py::Test_OtelSemantics_Spans_Http_Server::test_http_endpoint_retained_from_appsec: irrelevant (The AppSec endpoint retention request is specific to .NET)
tests/test_otel_tracestate_sampling.py::Test_EmitOtOnProbabilityDecision_Rate0_5: '>=0.5.2-dev'
tests/test_otel_tracestate_sampling.py::Test_ForceKeepClearsTh: missing_feature (manual keep not honored)
tests/test_otel_tracestate_sampling.py::Test_ForwardInboundOtUnchanged: '>=0.5.2-dev'
Expand Down
24 changes: 16 additions & 8 deletions tests/test_otel_http_semantics.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,15 +504,23 @@ def test_server_port(self) -> None:
assert _attributes(span).get("server.address"), "server.port is required once server.address is set"
_assert_int_attribute(span, "server.port", 7777)

def setup_http_endpoint_retained(self) -> None:
# http.endpoint is the endpoint-aggregation fallback for requests the framework
# resolved no route for, so use an unmatched path.
self.response = weblog.get("/no_such_route_xyz")
def setup_http_endpoint_retained_from_resource_renaming(self) -> None:
self.response = weblog.get("/resource_renaming/int/123")

def test_http_endpoint_retained_from_resource_renaming(self) -> None:
"""``http.endpoint`` created by resource renaming is retained."""
span = _server_span(self.response)
endpoint = _attributes(span).get("http.endpoint")
assert endpoint, "http.endpoint must be retained on the OTLP span"

def setup_http_endpoint_retained_from_appsec(self) -> None:
self.response = weblog.get("/waf/", headers={"User-Agent": "Arachni/v1"})

def test_http_endpoint_retained(self) -> None:
def test_http_endpoint_retained_from_appsec(self) -> None:
"""``http.endpoint`` is Datadog-only with no OTel equivalent, so it is retained."""
span = _server_span(self.response)
assert _attributes(span).get("http.endpoint"), "http.endpoint must be retained on the OTLP span"
endpoint = _attributes(span).get("http.endpoint")
assert endpoint, "http.endpoint must be retained on the OTLP span"

def setup_span_kind_is_server(self) -> None:
self.response = weblog.get("/")
Expand Down Expand Up @@ -732,7 +740,7 @@ def test_trace_metric_agrees_with_client_success(self) -> None:
attrs = _metric_attributes(_client_trace_metric(span))
assert attrs.get("http.request.method") == "GET"
assert attrs.get("http.response.status_code") == 201
assert "status.code" not in attrs, "successful HTTP trace metrics must leave OTel status unset"
assert _status_code(attrs.get("status.code")) == StatusCode.STATUS_CODE_OK.value
Comment thread
link04 marked this conversation as resolved.

def setup_trace_metric_agrees_with_server_error(self) -> None:
self.response = weblog.get("/status?code=503")
Expand All @@ -756,7 +764,7 @@ def test_trace_metric_agrees_with_server_success(self) -> None:
attrs = _metric_attributes(_server_trace_metric(span))
assert attrs.get("http.request.method") == "GET"
assert attrs.get("http.response.status_code") == 202
assert "status.code" not in attrs, "successful HTTP trace metrics must leave OTel status unset"
assert _status_code(attrs.get("status.code")) == StatusCode.STATUS_CODE_OK.value


@rfc("https://docs.google.com/document/d/1SONUGEa38eLumE5b6gnNhykFhzZL9uQpsnMFq06uDMY/edit")
Expand Down
1 change: 1 addition & 0 deletions utils/_context/_scenarios/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ class _Scenarios:
"DD_TRACE_OTEL_SEMANTICS_ENABLED": "true",
# OTel semantics must override both conflicting configurations.
"DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED": "true",
"DD_TRACE_RESOURCE_RENAMING_ALWAYS_SIMPLIFIED_ENDPOINT": "true",
Comment thread
link04 marked this conversation as resolved.
"DD_TRACE_RESOURCE_RENAMING_ENABLED": "true",
"DD_TRACE_SPAN_ATTRIBUTE_SCHEMA": "v1",
"DD_TRACE_OTEL_ENABLED": "true",
Expand Down
Loading