← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

OpenTelemetry

Observability Intermediate
debt(d7/e5/b5/t3)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). The detection_hints indicate automated detection is 'no' and the tool listed is opentelemetry itself (not a linter/SAST). Misuse patterns — like using vendor SDKs directly, skipping auto-instrumentation, or sending telemetry directly to a backend — won't surface until code review or when observability gaps are noticed in production. No default linter catches these omissions.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5). The quick_fix describes installing the SDK and contrib packages, configuring an OTLP exporter, deploying an OTel Collector, wiring auto-instrumentation, and adding custom spans. This is not a one-liner; it's a meaningful multi-file setup. Migrating away from a vendor SDK also touches every instrumentation call site, requiring a coordinated effort across the codebase.

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5). The applies_to scope covers web, cli, and queue-worker contexts — the full application surface. Every future developer adding new services, routes, or background jobs must understand and follow OTel patterns (span creation, context propagation, exporter config). However, once wired correctly, the abstraction largely stays out of daily work, so it doesn't fully reach the 'gravitational pull' of b7.

t3 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'minor surprise (one edge case)' (t3). The misconception is well-documented and fairly intuitive once explained: developers assume they must pick a backend before instrumenting, but OTel decouples the two. This is a conceptual ordering mistake rather than a deep behavioral gotcha, and the correct mental model is easy to internalize. Common mistakes (skipping auto-instrumentation, sending directly to backend) are practical setup errors, not conceptual traps that contradict prior knowledge.

About DEBT scoring →

TL;DR

OpenTelemetry (OTel) is the open standard for telemetry — a vendor-neutral SDK for traces, metrics, and logs that exports to any backend (Jaeger, Datadog, Honeycomb, Prometheus).

Explanation

OpenTelemetry: merged OpenCensus + OpenTracing. Three signals: Traces, Metrics, Logs. SDK: instrument code once, choose backend later. Collector: OTel Collector receives, processes, and exports telemetry — runs as a sidecar or agent. PHP: open-telemetry/opentelemetry-php, auto-instrumentation for HTTP/DB/Redis. Key concepts: Resource (service metadata), Exporter (sends to backend), Propagator (trace context across processes), Sampler (sampling decisions). OTLP protocol: the standard wire format. Auto-instrumentation: instrument frameworks without code changes (Laravel, Symfony contrib packages).

Common Misconception

OpenTelemetry requires choosing a backend first — it's the opposite. Instrument once with OTel, switch backends without code changes.

Why It Matters

OTel prevents vendor lock-in for observability — instrumented once, works with Datadog, Jaeger, Honeycomb, or any OTLP-compatible backend.

Common Mistakes

  • Using vendor SDK directly — locks you in.
  • Not installing auto-instrumentation packages — misses framework/HTTP/DB spans.
  • Sending telemetry directly to backend — use OTel Collector for buffering and processing.

Code Examples

✗ Vulnerable
// Vendor-locked instrumentation:
$dd = new DatadogTracer();
$span = $dd->startSpan('query'); // Only works with Datadog
✓ Fixed
// OpenTelemetry — vendor neutral:
use OpenTelemetry\API\Trace\TracerProviderInterface;

$span = $tracer->spanBuilder('db.query')
    ->setAttribute('db.statement', $sql)
    ->startSpan();
try { $result = $pdo->query($sql); }
finally { $span->end(); }

// Export to Jaeger today, Honeycomb tomorrow — no code change

Added 23 Mar 2026
Views 172
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
1 ping T 0 pings W 1 ping T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 6 pings T 4 pings F 2 pings S 4 pings S 3 pings M 0 pings T 1 ping W 0 pings T 0 pings F 0 pings S 0 pings S 1 ping M 0 pings T 0 pings W 0 pings T 0 pings F 1 ping S 1 ping S 0 pings M 0 pings T 0 pings W
No pings yet today
No pings yesterday
You.com 92 Scrapy 17 Amazonbot 10 Perplexity 9 Google 7 SEMrush 5 Ahrefs 4 ChatGPT 3 Majestic 2 Unknown AI 2 Qwen 2 Bing 2 Meta AI 1 PetalBot 1
crawler 154 crawler_json 3
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: High
⚡ Quick Fix
Install opentelemetry-php SDK + contrib packages. Configure OTLP exporter. Deploy OTel Collector. Use auto-instrumentation for HTTP, DB, Redis. Add custom spans for business logic.
📦 Applies To
web cli queue-worker Laravel Symfony
🔗 Prerequisites
🔍 Detection Hints
opentelemetry|otel
Auto-detectable: ✗ No opentelemetry
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: High Context: File


✓ schema.org compliant