Skip to content
Draft
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
22 changes: 10 additions & 12 deletions tests/parametric/test_otel_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ class Test_FR11_Telemetry:
"""Test OTLP Logs generated via OpenTelemetry API generate telemetry configurations and metrics."""

@pytest.mark.parametrize(
("library_env", "endpoint_env", "test_agent_otlp_http_port"),
("library_env", "test_agent_otlp_http_port"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please restore the endpoint_env pytest parameter and the value in the corresponding argument, that should allow the test cases to be wired up correctly and pass

[
(
{
Expand All @@ -664,15 +664,12 @@ class Test_FR11_Telemetry:
"OTEL_EXPORTER_OTLP_HEADERS": "api-key=key,other-config-value=value",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
},
"OTEL_EXPORTER_OTLP_ENDPOINT",
4320,
),
],
)
def test_telemetry_exporter_configurations(
self,
library_env: dict[str, str],
otlp_endpoint_library_env: dict[str, str], # noqa: ARG002
test_agent: TestAgentAPI,
test_library: APMLibrary,
):
Expand All @@ -688,9 +685,11 @@ def test_telemetry_exporter_configurations(

for expected_env, expected_value in [
("OTEL_EXPORTER_OTLP_TIMEOUT", "30000"),
("OTEL_EXPORTER_OTLP_HEADERS", "api-key=key,other-config-value=value"),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_HEADERS", "<redacted>"),
("OTEL_EXPORTER_OTLP_PROTOCOL", "http/protobuf"),
("OTEL_EXPORTER_OTLP_ENDPOINT", library_env["OTEL_EXPORTER_OTLP_ENDPOINT"]),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_ENDPOINT", "<redacted>"),
]:
# Find configuration with env_var origin (since these are set via environment variables)
config = test_agent.get_telemetry_config_by_origin(
Expand All @@ -705,7 +704,7 @@ def test_telemetry_exporter_configurations(
)

@pytest.mark.parametrize(
("library_env", "endpoint_env", "test_agent_otlp_http_port"),
("library_env", "test_agent_otlp_http_port"),
[
(
{
Expand All @@ -716,15 +715,12 @@ def test_telemetry_exporter_configurations(
"OTEL_EXPORTER_OTLP_LOGS_HEADERS": "api-key=key,other-config-value=value",
"OTEL_EXPORTER_OTLP_LOGS_PROTOCOL": "http/protobuf",
},
"OTEL_EXPORTER_OTLP_LOGS_ENDPOINT",
4325,
),
],
)
def test_telemetry_exporter_logs_configurations(
self,
library_env: dict[str, str],
otlp_endpoint_library_env: dict[str, str], # noqa: ARG002
test_agent: TestAgentAPI,
test_library: APMLibrary,
):
Expand All @@ -747,9 +743,11 @@ def test_telemetry_exporter_logs_configurations(

for expected_env, expected_value in [
("OTEL_EXPORTER_OTLP_LOGS_TIMEOUT", "30000"),
("OTEL_EXPORTER_OTLP_LOGS_HEADERS", "api-key=key,other-config-value=value"),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_LOGS_HEADERS", "<redacted>"),
("OTEL_EXPORTER_OTLP_LOGS_PROTOCOL", "http/protobuf"),
("OTEL_EXPORTER_OTLP_LOGS_ENDPOINT", library_env["OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"]),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_LOGS_ENDPOINT", "<redacted>"),
]:
# Find configuration with env_var origin (since these are set via environment variables)
config = test_agent.get_telemetry_config_by_origin(
Expand Down
22 changes: 10 additions & 12 deletions tests/parametric/test_otel_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ def test_telemetry_default_configurations(self, test_agent: TestAgentAPI, test_l
)

@pytest.mark.parametrize(
("library_env", "endpoint_env", "test_agent_otlp_http_port"),
("library_env", "test_agent_otlp_http_port"),
[
(
{
Expand All @@ -1874,15 +1874,12 @@ def test_telemetry_default_configurations(self, test_agent: TestAgentAPI, test_l
"OTEL_METRIC_EXPORT_INTERVAL": "5000",
"OTEL_METRIC_EXPORT_TIMEOUT": "5000",
},
"OTEL_EXPORTER_OTLP_ENDPOINT",
4320,
),
],
)
def test_telemetry_exporter_configurations(
self,
library_env: dict[str, str],
otlp_metrics_endpoint_library_env: dict[str, str], # noqa: ARG002
test_agent: TestAgentAPI,
test_library: APMLibrary,
):
Expand All @@ -1900,9 +1897,11 @@ def test_telemetry_exporter_configurations(

for expected_env, expected_value in [
("OTEL_EXPORTER_OTLP_TIMEOUT", "30000"),
("OTEL_EXPORTER_OTLP_HEADERS", "api-key=key,other-config-value=value"),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_HEADERS", "<redacted>"),
("OTEL_EXPORTER_OTLP_PROTOCOL", "http/protobuf"),
("OTEL_EXPORTER_OTLP_ENDPOINT", library_env["OTEL_EXPORTER_OTLP_ENDPOINT"]),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_ENDPOINT", "<redacted>"),
("OTEL_METRIC_EXPORT_INTERVAL", "5000"),
("OTEL_METRIC_EXPORT_TIMEOUT", "5000"),
]:
Expand All @@ -1917,7 +1916,7 @@ def test_telemetry_exporter_configurations(
)

@pytest.mark.parametrize(
("library_env", "endpoint_env", "test_agent_otlp_http_port"),
("library_env", "test_agent_otlp_http_port"),
[
(
{
Expand All @@ -1927,15 +1926,12 @@ def test_telemetry_exporter_configurations(
"OTEL_EXPORTER_OTLP_METRICS_HEADERS": "api-key=key,other-config-value=value",
"OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf",
},
"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT",
4325,
),
],
)
def test_telemetry_exporter_metrics_configurations(
self,
library_env: dict[str, str],
otlp_metrics_endpoint_library_env: dict[str, str], # noqa: ARG002
test_agent: TestAgentAPI,
test_library: APMLibrary,
):
Expand All @@ -1953,9 +1949,11 @@ def test_telemetry_exporter_metrics_configurations(

for expected_env, expected_value in [
("OTEL_EXPORTER_OTLP_METRICS_TIMEOUT", "30000"),
("OTEL_EXPORTER_OTLP_METRICS_HEADERS", "api-key=key,other-config-value=value"),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_METRICS_HEADERS", "<redacted>"),
("OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", "http/protobuf"),
("OTEL_EXPORTER_OTLP_METRICS_ENDPOINT", library_env["OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"]),
# TODO: uncomment when redaction is implemented everywhere
# ("OTEL_EXPORTER_OTLP_METRICS_ENDPOINT", "<redacted>"),
]:
# Find configuration with env_var origin (since these are set via environment variables)
config = test_agent.get_telemetry_config_by_origin(
Expand Down
Loading