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
23 changes: 6 additions & 17 deletions manifests/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,25 +134,14 @@ manifest:
tests/parametric/test_otel_api_interoperability.py::Test_Otel_API_Interoperability::test_span_links_add: missing_feature # Created by easy win activation script
tests/parametric/test_otel_api_interoperability.py::Test_Otel_API_Interoperability::test_update_resource: missing_feature # Created by easy win activation script
tests/parametric/test_otel_env_vars.py::Test_Otel_Env_Vars: incomplete_test_app (/trace/config endpoint is not implemented)
tests/parametric/test_otel_logs.py: '>=0.2.1' # Modified by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR01_Enable_OTLP_Log_Collection::test_otlp_logs_enabled: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR03_Resource_Attributes: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR04_Trace_Span_IDs: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR05_Custom_Endpoints: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR06_OTLP_Protocols: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR07_Host_Name: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR08_Custom_Headers: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR09_Log_Injection: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR10_Timeout_Configuration: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR11_Telemetry: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR12_Log_Levels: missing_feature # Created by easy win activation script
tests/parametric/test_otel_logs.py::Test_FR13_Scope_Fields: missing_feature # Created by easy win activation script
tests/parametric/test_otel_metrics.py: v0.3.0 # Easy win for all weblogs and version 0.2.1
tests/parametric/test_otel_logs.py: v0.3.0
tests/parametric/test_otel_logs.py::Test_FR11_Telemetry::test_telemetry_metrics: missing_feature (Rust telemetry metrics are not submitted in time to run tests against)
tests/parametric/test_otel_logs.py::Test_FR13_Scope_Fields::test_scope_attributes_field: missing_feature (OpenTelemetry Rust SDK limitation - scope attributes not exported by opentelemetry-otlp)
tests/parametric/test_otel_logs.py::Test_FR13_Scope_Fields::test_scope_schema_url_field: missing_feature (OpenTelemetry Rust SDK limitation - schema_url not exported by opentelemetry-otlp)
tests/parametric/test_otel_logs.py::Test_FR13_Scope_Fields::test_scope_version_field: missing_feature (OpenTelemetry Rust SDK limitation - scope version not exported by opentelemetry-otlp)
tests/parametric/test_otel_metrics.py: v0.3.0
? tests/parametric/test_otel_metrics.py::Test_Otel_Metrics_Api_Instrument::test_otel_histogram_add_non_negative_and_negative_values
: missing_feature (OpenTelemetry Rust SDK does not filter negative values for Histogram.record(). This is a bug in the upstream SDK)
tests/parametric/test_otel_metrics.py::Test_Otel_Metrics_Api_MeterProvider::test_otel_get_meter_by_distinct_schema_url: # Modified by easy win activation script
- declaration: missing_feature (Rust OpenTelemetry SDK 0.31.0's meter() method does not support schema_url parameter)
component_version: <0.2.1
tests/parametric/test_otel_metrics.py::Test_Otel_Metrics_Api_MeterProvider::test_otel_get_meter_by_distinct_scope_attributes: missing_feature (Rust OpenTelemetry SDK 0.31.0's meter() method does not support scope attributes parameter)
tests/parametric/test_otel_metrics.py::Test_Otel_Metrics_Host_Name::test_hostname_from_dd_hostname: missing_feature
tests/parametric/test_otel_metrics.py::Test_Otel_Metrics_Telemetry::test_telemetry_metrics_grpc: '>=0.2.1' # Modified by easy win activation script
Expand Down
24 changes: 8 additions & 16 deletions tests/parametric/test_otel_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from utils.docker_fixtures.parametric import LogLevel
from utils.docker_fixtures import TestAgentAPI
from utils.docker_fixtures.spec.trace import find_only_span
from utils.docker_fixtures.spec.trace import extract_trace_id_from_otel_span

from .conftest import APMLibrary

Expand Down Expand Up @@ -114,14 +115,7 @@ def test_otlp_logs_enabled(self, test_agent: TestAgentAPI, test_library: APMLibr
log_payloads = test_agent.wait_for_num_log_payloads(1)
assert find_log_record(log_payloads, "otlp_logs_enabled", "test_otlp_logs_enabled") is not None

@pytest.mark.parametrize(
"library_env",
[
{"DD_LOGS_OTEL_ENABLED": "false", "DD_TRACE_DEBUG": None},
{"DD_LOGS_OTEL_ENABLED": None, "DD_TRACE_DEBUG": None},
],
ids=["disabled", "default"],
)
@pytest.mark.parametrize("library_env", [{"DD_LOGS_OTEL_ENABLED": "false", "DD_TRACE_DEBUG": None}])
def test_otlp_logs_disabled(self, test_agent: TestAgentAPI, test_library: APMLibrary):
"""Logs are not emitted when disabled."""
with test_library as library:
Expand Down Expand Up @@ -216,8 +210,7 @@ def test_dd_span_context_injection(self, test_agent: TestAgentAPI, test_library:
expected_trace_id = base64.b64decode(log_record["trace_id"]).hex()

root = find_only_span(test_agent.wait_for_num_traces(1))
root_tid = root["meta"].get("_dd.p.tid", "0" * 16)
trace_id = f"{root_tid}{root['trace_id']:016x}"
trace_id = extract_trace_id_from_otel_span(root)
span_id = f"{root['span_id']:016x}"

assert expected_span_id == span_id, f"Expected span_id {expected_span_id}, got {span_id}, span: {root}"
Expand Down Expand Up @@ -245,8 +238,7 @@ def test_otel_span_context_injection(self, test_agent: TestAgentAPI, test_librar
expected_trace_id = base64.b64decode(log_record["trace_id"]).hex()

root = find_only_span(test_agent.wait_for_num_traces(1))
root_tid = root["meta"].get("_dd.p.tid", "0" * 16)
trace_id = f"{root_tid}{root['trace_id']:016x}"
trace_id = extract_trace_id_from_otel_span(root)
span_id = f"{root['span_id']:016x}"
assert expected_span_id == span_id, f"Expected span_id {expected_span_id}, got {span_id}, span: {root}"
assert expected_trace_id == trace_id, f"Expected trace_id {expected_trace_id}, got {trace_id}, span: {root}"
Expand Down Expand Up @@ -642,10 +634,10 @@ def test_default_timeout(self, test_agent: TestAgentAPI, test_library: APMLibrar
assert isinstance(exporter_timeout, dict)
assert isinstance(exporter_logs_timeout, dict)

assert exporter_timeout.get("value") == 10000, (
assert str(exporter_timeout.get("value")) == "10000", (
f"OTEL_EXPORTER_OTLP_TIMEOUT should be 10000, exporter_timeout: {exporter_timeout}"
)
assert exporter_logs_timeout.get("value") == 10000, (
assert str(exporter_logs_timeout.get("value")) == "10000", (
f"OTEL_EXPORTER_OTLP_LOGS_TIMEOUT should be 10000, exporter_logs_timeout: {exporter_logs_timeout}"
)

Expand Down Expand Up @@ -749,7 +741,7 @@ def test_telemetry_exporter_logs_configurations(
configurations_by_name = test_agent.wait_for_telemetry_configurations()

for expected_env, expected_value in [
("OTEL_EXPORTER_OTLP_LOGS_TIMEOUT", 30000),
("OTEL_EXPORTER_OTLP_LOGS_TIMEOUT", "30000"),
("OTEL_EXPORTER_OTLP_LOGS_HEADERS", "api-key=key,other-config-value=value"),
("OTEL_EXPORTER_OTLP_LOGS_PROTOCOL", "http/protobuf"),
("OTEL_EXPORTER_OTLP_LOGS_ENDPOINT", library_env["OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"]),
Expand All @@ -760,7 +752,7 @@ def test_telemetry_exporter_logs_configurations(
)
assert config is not None, f"No configuration found for '{expected_env}'"
assert isinstance(config, dict)
assert config.get("value") == expected_value, (
assert str(config.get("value")) == expected_value, (
f"Expected {expected_env} to be {expected_value}, configuration: {config}"
)

Expand Down
Loading
Loading