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
| Model | Pass Rate | Runs | Avg Cost | Avg Time |
|---|---|---|---|---|
| gemini-3-flash-preview | 33% | | $0.16 | 7m |
| kimi-k2-thinking | 33% | | $0.22 | 29m |
| gemini-3-pro-preview | 33% | | $0.68 | 9m |
| claude-sonnet-4.5 | 33% | | $1.00 | 12m |
| gpt-5.2-codex | 0% | | $0.00 | 20m |
| deepseek-v3.2 | 0% | | $0.40 | 36m |
| claude-haiku-4.5 | 0% | | $0.50 | 8m |
| glm-4.7 | 0% | | $0.69 | 25m |
| claude-opus-4.5 | 0% | | $0.90 | 10m |
| gpt-5.1 | 0% | | $0.98 | 27m |
| gpt-5.2 | 0% | | $1.00 | 19m |
| grok-4.1-fast | 0% | | $1.12 | 61m |
| grok-4 | 0% | | $2.20 | 38m |
| gpt-5.1-codex-max | 0% | | $2.75 | 37m |
All product names, logos, and brands (™/®) are the property of their respective owners; they're used here solely for identification and comparison, and their use does not imply affiliation, endorsement, or sponsorship.