Repository navigation
test(otel): cover OTEL_EXPORTER_OTLP_ENDPOINT base path for OTLP logs, metrics and traces - #8112
Conversation
|
|
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 58d2e74 | Docs | View more details | Give us feedback! |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca4dde950d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
vpellan
left a comment
There was a problem hiding this comment.
shouldn't the logs and metrics tests be located in tests/parametric/otel_env_vars/test_otel_exporter_otlp_[logs,metrics]_endpoint.py instead?
…iable endpoint classes
Motivation
When the signal-specific endpoint (
OTEL_EXPORTER_OTLP_{LOGS,METRICS,TRACES}_ENDPOINT) is unset, the OTLP/HTTP URL must be derived fromOTEL_EXPORTER_OTLP_ENDPOINTby appendingv1/<signal>and keeping any base path (OTLP spec, "Endpoint URLs for OTLP/HTTP"), e.g.http://collector:4318/mycollector->http://collector:4318/mycollector/v1/logs. dd-trace-dotnet drops the base path for logs, and dd-trace-rb drops it for logs and metrics when it has no trailing slash.Jira: APMAPI-2609 (epic), APMAPI-2620 (dotnet logs), APMAPI-2641 (ruby logs and metrics)
Changes
test_generic_endpoint_with_base_pathto each signal-specific endpoint class intests/parametric/otel_env_vars/, with and without a trailing slash (http/protobuf):Test_OTEL_EXPORTER_OTLP_LOGS_ENDPOINTTest_OTEL_EXPORTER_OTLP_METRICS_ENDPOINTTest_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT/v1/{logs,metrics,traces}, so a shared fixture (otlp_base_path_library_env,tests/parametric/conftest.py) starts a tiny forwarder container that only acceptsPOST <base path>/v1/<signal>, forwards it to the test agent and answers 404 otherwise. Data reaches the test agent only if the library used the expected URL.bug (APMAPI-2620)bug (APMAPI-2641)v1.26.0(the rest of the class is enabled fromv1.23.0)🤖 Generated with Claude Code