Skip to content

Add otel endpoint in weblog [php@MilanGarnier/propagation-behavior-extract]#7190

Open
MilanGarnier wants to merge 9 commits into
mainfrom
milan.garnier/php-weblog
Open

Add otel endpoint in weblog [php@MilanGarnier/propagation-behavior-extract]#7190
MilanGarnier wants to merge 9 commits into
mainfrom
milan.garnier/php-weblog

Conversation

@MilanGarnier

@MilanGarnier MilanGarnier commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Add a PHP weblog endpoint that extracts distributed tracing context via the
    OTel propagator API and forwards a request to a downstream URL. This is needed
    to test DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT behavior (restart / ignore)
    when context extraction goes through the OTel drop-in bridge.
  • Enabling tests for feature DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT for feat(tracing): add DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT dd-trace-php#3997

Changes

  • New endpoint GET /otel_drop_in_extract_and_make_distant_call?url=<url>
    (utils/build/docker/php/common/otel_drop_in_extract_and_make_distant_call.php):
    • Extracts incoming trace context using OpenTelemetry\API\Globals::propagator()->extract(),
      which the DDTrace bridge maps to consume_distributed_tracing_headers.
    • Creates an OTel server span parented to the extracted context.
    • Makes an outbound cURL request to the provided url, propagating the
      active context through DDTrace's auto-instrumentation.
    • Returns JSON with url, status_code, request_headers, and
      response_headers for assertion in tests.
  • Rewrite rule added in rewrite-rules.conf (with [QSA] to preserve
    the url query parameter).
  • Enables Test_ExtractBehavior_Restart_Otel for PHP >= 8.1 versions

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/build/docker/php/common/otel_drop_in_extract_and_make_distant_call.php  @DataDog/apm-php @DataDog/system-tests-core
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
utils/build/docker/php/common/rewrite-rules.conf                        @DataDog/apm-php @DataDog/system-tests-core

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jun 22, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

Testing the test | System Tests (php, dev) / Get parameters / Get parameters   View in Datadog   GitHub Actions

Testing the test | Fail if target branch is specified   View in Datadog   GitHub Actions

Testing the test | all-jobs-are-green   View in Datadog   GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 1 job - 0 passed on retry View in Datadog

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: cd83738 | Docs | Datadog PR Page | Give us feedback!

@datadog-system-tests-org

datadog-system-tests-org Bot commented Jun 22, 2026

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

🚦 31 Pipeline jobs failed

Testing the test | Fail if target branch is specified   View in Datadog   GitHub Actions

Testing the test | System Tests (php, dev) / End-to-end #1 / apache-mod-7.0-zts 1   View in Datadog   GitHub Actions

Testing the test | System Tests (php, dev) / End-to-end #1 / php-fpm-7.1 1   View in Datadog   GitHub Actions

View all 31 failed jobs.

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b8a4af3 | Docs | Give us feedback!

@MilanGarnier MilanGarnier changed the title Add otel endpoint in weblog Add otel endpoint in weblog [php@MilanGarnier/propagation-behavior-extract] Jun 22, 2026
@MilanGarnier MilanGarnier marked this pull request as ready for review June 23, 2026 12:13
@MilanGarnier MilanGarnier requested review from a team as code owners June 23, 2026 12:13
@MilanGarnier MilanGarnier marked this pull request as draft June 23, 2026 12:14

@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: b8a4af3722

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread manifests/php.yml Outdated
@MilanGarnier MilanGarnier marked this pull request as ready for review July 9, 2026 13:39

@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: 5edaf2c2e8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread manifests/php.yml
Comment thread manifests/php.yml
@MilanGarnier MilanGarnier force-pushed the milan.garnier/php-weblog branch from 48c7062 to 5edaf2c Compare July 9, 2026 14:40

@nccatoni nccatoni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All good for me (@DataDog/system-tests-core) but you should get a review from someone in the php team

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.

2 participants