worldia/instrumentation-bundle
Symfony bundle that adds OpenTelemetry instrumentation to your app, with automatic tracing for HTTP requests, console commands, Doctrine, Messenger, and HTTP clients. Collect and export traces and metrics to your observability backend.
Architecture fit
worldia/instrumentation-bundle hooks into Symfony's DI container, compiler passes, event dispatcher, and bundle extension lifecycle (Extension::loadTracing() / loadMetrics()). Laravel's service container, package discovery, and event system are different enough that this is not installable-and-usable in a Laravel app without a bridge. If the stated goal is Laravel observability, treat this as a reference architecture, not a dependency.AttributeProviderInterface and OperationNameResolverInterface for semantics, an AbstractVoter + regex blacklist for sampling, and separate, independently-toggled tracing vs. metrics subscribers.Metrics::getMeter() static facade; inject MeterProviderInterface). This is correct OpenTelemetry practice and reduces the "one decorator does everything" coupling that makes instrumentation packages hard to modify.__destruct() backstop, e.g. TracedResponse) shows awareness of the classic span-leak failure mode. That is a maturity signal.Integration feasibility
agents/skills/*.md files encoding mandatory conventions (use semconv constants, never inline attribute strings; register in semconv.php; put tag-discovery loops in a dedicated *CompilerPass; gate optional dependencies with interface_exists()). This is a genuine differentiator — it lowers the cost of adding private instrumentation and makes code review deterministic.open-telemetry/* ranges can block your own SDK upgrade.Technical risk
OpenTelemetry\SemConv constants. Upstream semconv reorganizations (stable → incubating moves) become breaking changes in your dashboards, not just in code.Voter filtering is flexible but coarse; per-route or per-tenant tail-sampling policies likely need custom voters.Key questions
open-telemetry/sdk and semconv versions are supported, and what is the upgrade policy?Stack fit
tracing.request, tracing.doctrine, tracing.message.Migration path
service.name/deployment.environment resource attributes, and that HTTP client propagation works across one real service boundary.metrics.<feature>.enabled, default false). Enable one (e.g. messages_time_to_consume_seconds) and confirm naming/unit conventions match your dashboard standards before broadening.AttributeProvider and a blacklist voter for noisy endpoints/commands, then freeze that as an internal conventions doc.Compatibility
open-telemetry/* as a coupled upgrade unit; add a CI job that runs the bundle's tests against your pinned SDK version.interface_exists()/class_exists() — the bundle already does this, but your app must not hard-require those packages.Sequencing
Maintenance
SKILL.md files, internal contributors (including AI coding agents) have a documented path for adding instrumentation. That materially reduces the "only the original author can extend this" risk — worth weighting against the low star count.Support
Scaling
Failure modes
metrics.<feature>.enabled defaults to false, so metrics can be "on" in the plan and absent in production.open-telemetry/sdk than another dependency requires.Ramp-up
OperationNameResolver), blacklist policy, and the fork/vendoring policy — this is what makes the rollout survivable if upstream stalls.How can I help you explore Laravel packages today?