Skip to main content

TasksPHP Distributed Context Propagation

PHP10% pass rateView TaskView Prompt

Instrument a PHP client-server application with OTEL tracing. Demonstrate distributed context propagation, produce exactly 2 trace IDs.

What makes it easy

- PHP OTEL SDK is relatively straightforward - Composer dependency management works well - HTTP context propagation is simpler in PHP

Common failure modes

- Server output format mismatch (test expects "Server starting on :8080" but PHP dev server outputs different format) - Only 1 trace ID produced instead of 2 (context propagated across both workflows)

Example error

AssertionError: Expected at least 2 trace IDs, got 1

Performance

ModelPass RateRunsAvg CostAvg Time
Googlegemini-3-flash-preview33%
$0.167m
Kimikimi-k2-thinking33%
$0.2229m
Googlegemini-3-pro-preview33%
$0.689m
Anthropicclaude-sonnet-4.533%
$1.0012m
OpenAIgpt-5.2-codex0%
$0.0020m
DeepSeekdeepseek-v3.20%
$0.4036m
Anthropicclaude-haiku-4.50%
$0.508m
Z.aiglm-4.70%
$0.6925m
Anthropicclaude-opus-4.50%
$0.9010m
OpenAIgpt-5.10%
$0.9827m
OpenAIgpt-5.20%
$1.0019m
Grokgrok-4.1-fast0%
$1.1261m
Grokgrok-40%
$2.2038m
OpenAIgpt-5.1-codex-max0%
$2.7537m