Skip to content

fix: use interfaces.library instead of interfaces.agent in config consistency tests#6670

Draft
link04 wants to merge 2 commits intomainfrom
maxim/fix-php-config-tests-use-library-interface
Draft

fix: use interfaces.library instead of interfaces.agent in config consistency tests#6670
link04 wants to merge 2 commits intomainfrom
maxim/fix-php-config-tests-use-library-interface

Conversation

@link04
Copy link
Copy Markdown
Contributor

@link04 link04 commented Apr 1, 2026

Summary

  • Increase agent_interface_timeout from 5s to 15s for TRACING_CONFIG_NONDEFAULT and IPV6 scenarios

Root cause

PHP's libdatadog sidecar buffers traces for up to 5s before sending to the agent (DEFAULT_FLUSH_INTERVAL_MS=5000 in trace_flusher.rs). The Datadog Agent then needs its own flush cycle (~10s) to forward traces to the backend proxy. With the default 5s agent_interface_timeout, the system-tests proxy doesn't capture agent→backend traffic in time, leaving interfaces.agent empty.

Other languages send traces directly from the tracer to the agent (no sidecar), so traces arrive sooner and the agent has time to flush within the 5s window.

This specifically affects PHP in dd-trace-php's [tracer-release] CI job, where all 73 scenarios run sequentially in a single 4GB pod, making flush timing more sensitive to resource pressure.

Validation

Testing via dd-trace-php branch maximo/flaky-tests-fix which points the [tracer-release] job at this system-tests branch.

Test plan

  • All tests pass locally with PHP (apache-mod-8.0)
  • Verify [tracer-release] job on dd-trace-php no longer fails TRACING_CONFIG_NONDEFAULT and IPV6 tests

🤖 Generated with Claude Code

@link04 link04 requested a review from a team as a code owner April 1, 2026 21:21
@link04 link04 marked this pull request as draft April 1, 2026 21:22
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

CODEOWNERS have been resolved as:

utils/build/docker/php/apache-mod-8.0.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core

…nd IPV6

PHP's libdatadog sidecar buffers traces for up to 5s before sending to
the agent (DEFAULT_FLUSH_INTERVAL_MS=5000). The agent then needs its own
flush cycle (~10s) to forward to the backend. With the default 5s
agent_interface_timeout, the proxy may not capture agent→backend traffic
in time, causing interfaces.agent to have no data.

This specifically affects PHP in CI's [tracer-release] job where resource
pressure makes flush timing worse. Other languages send traces directly
from the tracer (no sidecar buffering), so traces reach the agent sooner.

Bump to 15s to accommodate: sidecar buffer (5s) + agent flush (~10s).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…agent interface tests

The PHP BGS (background sender) with DD_TRACE_AGENT_FLUSH_AFTER_N_REQUESTS=0
creates a new curl connection per request, overwhelming the proxy/agent
with hundreds of individual chunked-transfer HTTP calls in high-volume
scenarios (SAMPLING, TRACING_CONFIG_NONDEFAULT). This causes the DD Agent
to not flush traces to the backend before the test framework stops it.

Enable DD_TRACE_SIDECAR_TRACE_SENDER=true on the apache-mod-8.0 weblog
to use the sidecar's shared-memory batched delivery instead. The sidecar
is already running on PHP 8.0 for telemetry; this just enables it for
traces too.

Reverts the agent_interface_timeout increases since they addressed the
symptom, not the root cause.

Tested locally: TRACING_CONFIG_NONDEFAULT and SAMPLING both pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant