specoto/trace
Composer 安装命令:
composer require specoto/trace
包简介
PSR-22 Application Tracing interfaces — intentionally minimalist tracing contracts for PHP
README 文档
README
This package provides the proposed PSR-22 interfaces for application tracing in PHP. It contains only interfaces and enums — no concrete implementations.
This is a personal prototype based on the PSR-22 draft. Library and framework authors can depend on this package; tracing providers can implement these interfaces.
Interfaces
| Interface | Purpose |
|---|---|
TracerProviderInterface | Entry point — get a named tracer |
TracerInterface | Create spans |
SpanInterface | Read/write span data |
SpanContextInterface | W3C trace context identity |
Enums
| Enum | Values |
|---|---|
SpanKind | INTERNAL, CLIENT, SERVER, PRODUCER, CONSUMER |
SpanStatus | UNSET, OK, ERROR |
Design
This package is intentionally minimalist — it scopes itself to what library authors need to emit tracing signals, and nothing more. Transmission, batching, exporting, and context propagation are out of scope.
See the PSR-22 meta document for the full rationale:
"This standard aims to create an intentionally minimalist set of interfaces that can be used to provide tracing signals to 3rd party libraries in a unified manner."
"By taking transmission mechanisms out of scope for this PSR, we drastically increase the simple adoptability of tracing for all parties involved."
Repository
GitLab: gitlab.com/specoto/trace
Packagist: specoto/trace
Requirements
- PHP 8.3+ (enums)
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-17