Skip to content

test(otel): cover OTEL_EXPORTER_OTLP_ENDPOINT base path for OTLP logs, metrics and traces - #8112

Merged
MilanGarnier merged 5 commits into
mainfrom
milan.garnier/otlp-logs-endpoint-base-path
Oct 22, 2026
Merged

MilanGarnier merged 5 commits into
mainfrom
milan.garnier/otlp-logs-endpoint-base-path

Conversation

@MilanGarnier

@MilanGarnier MilanGarnier commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

When the signal-specific endpoint (OTEL_EXPORTER_OTLP_{LOGS,METRICS,TRACES}_ENDPOINT) is unset, the OTLP/HTTP URL must be derived from OTEL_EXPORTER_OTLP_ENDPOINT by appending v1/<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

  • Add test_generic_endpoint_with_base_path to each signal-specific endpoint class in tests/parametric/otel_env_vars/, with and without a trailing slash (http/protobuf):
    • logs: Test_OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
    • metrics: Test_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
    • traces: Test_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
  • The test agent only routes the exact paths /v1/{logs,metrics,traces}, so a shared fixture (otlp_base_path_library_env, tests/parametric/conftest.py) starts a tiny forwarder container that only accepts POST <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.
  • Manifests:
    • dotnet logs: bug (APMAPI-2620)
    • ruby logs and metrics: bug (APMAPI-2641)
    • php metrics: v1.26.0 (the rest of the class is enabled from v1.23.0)

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/dotnet.yml                                                    @DataDog/system-tests-reviewers
manifests/php.yml                                                       @DataDog/system-tests-reviewers
manifests/ruby.yml                                                      @DataDog/system-tests-reviewers
tests/parametric/conftest.py                                            @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_logs_endpoint.py  @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_metrics_endpoint.py  @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_traces_endpoint.py  @DataDog/system-tests-reviewers

@MilanGarnier MilanGarnier changed the title test(otel): cover OTEL_EXPORTER_OTLP_ENDPOINT base path for OTLP logs test(otel): cover OTEL_EXPORTER_OTLP_ENDPOINT base path for OTLP logs, metrics and traces Oct 20, 2026
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 58d2e74 | Docs | View more details | Give us feedback!

@MilanGarnier

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T12:09:53.026708Z ca4dde9 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

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".

@MilanGarnier
MilanGarnier marked this pull request as ready for review October 21, 2026 11:58
@MilanGarnier
MilanGarnier requested a review from a team as a code owner October 21, 2026 11:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread manifests/php.yml Resolved

@vpellan vpellan left a comment

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.

shouldn't the logs and metrics tests be located in tests/parametric/otel_env_vars/test_otel_exporter_otlp_[logs,metrics]_endpoint.py instead?

@MilanGarnier
MilanGarnier merged commit 285c8cf into main Oct 22, 2026
476 checks passed
@MilanGarnier
MilanGarnier deleted the milan.garnier/otlp-logs-endpoint-base-path branch October 22, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants