waffle-commons/telemetry-otel
Composer 安装命令:
composer require waffle-commons/telemetry-otel
包简介
OpenTelemetry SDK bridge for Waffle Commons: implements the framework TracerInterface with W3C trace-context propagation, keeping the OTel SDK out of the core perimeter.
README 文档
README
Waffle Commons — Telemetry (OpenTelemetry Bridge)
OpenTelemetry SDK bridge for the Waffle Commons framework. It implements
Waffle\Commons\Contracts\Telemetry\TracerInterface on top of the audited OpenTelemetry PHP SDK and propagates
W3C Trace Context on outbound HTTP calls — isolating the vendor SDK in this adapter so the core packages
stay vendor-free.
Status: shipped in Beta 5 / AXE 5 (RFC-005). The SDK-free defaults, the Prometheus endpoint and the metric collectors live in
waffle-commons/telemetry.
What's inside
- Tracer adapters —
Trace\OtelTracer,Trace\OtelSpanandTrace\OtelSpanContextadapt the OpenTelemetry SDK to the framework'sContracts\Telemetry\TracerInterface/SpanInterface/SpanContextInterface. The SDK owns the active-context stack, so the adapters hold no per-request worker state. - W3C propagation —
Propagation\W3CTraceContextPropagatorinjects / extractstraceparent+tracestate, enabling transparent distributed tracing across services. - Factory —
Factory\OtelTracerFactoryassembles a tracer from anySpanExporterInterface(or a console JSON exporter for localdocker logsinspection), keeping everyOpenTelemetry\SDK\*symbol out of the core perimeter.
Perimeter
The only Waffle package permitted to require the OpenTelemetry SDK (open-telemetry/*). Depends on
waffle-commons/contracts plus the OTel SDK; mago guard is configured to allow the SDK here and nowhere
else. The request-scoped trace-context holder implements ResettableInterface (wfl igor 0 KO).
Development
composer install composer mago # fmt + lint + analyze + guard — must be ZERO output composer tests # PHPUnit 12.5, >=95% coverage composer igor # worker-safety audit — 0 KO
License
MIT — see LICENSE.md.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-08