Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Instrumentation Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • This is a Symfony bundle, not a Laravel package. That is the single most important finding: 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.
  • For a Symfony shop, the architecture is idiomatic and well-factored. Instrumentation is decomposed into consistent seams: swappable AttributeProviderInterface and OperationNameResolverInterface for semantics, an AbstractVoter + regex blacklist for sampling, and separate, independently-toggled tracing vs. metrics subscribers.
  • The tracing/metrics split is a deliberate design decision (no 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.
  • Deferred-result handling (spans ended on consumption with a __destruct() backstop, e.g. TracedResponse) shows awareness of the classic span-leak failure mode. That is a maturity signal.

Integration feasibility

  • Coverage is the standard "boring but high-value" surface: HTTP requests in, console commands, Messenger (async jobs), Doctrine (DB), plus a GenAI/AI-platform layer. That maps well to a typical Symfony service.
  • Extensibility is unusually well documented for agents: the repo ships 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.
  • Feasibility risk is concentrated in version coupling: OpenTelemetry PHP API/SDK and semconv packages iterate quickly and are pre-1.0 in places. A bundle pinned to specific open-telemetry/* ranges can block your own SDK upgrade.

Technical risk

  • Adoption risk (high): 28 stars, 0 dependents, a single-vendor steward. There is no observable third-party production usage. Busfactor of roughly one team.
  • Metadata anomaly: last release date is listed as 2026-10-07, which is in the future relative to a normal evaluation window. This reads as a data-quality artifact (mirrored private repo, mis-tagged date, or scraped feed error). Do not plan against that date until verified against Packagist/git tags.
  • Framework lock-in (high, given the framing): any Laravel investment here is a rewrite, not an integration.
  • Semconv drift (medium): attribute names are pinned to OpenTelemetry\SemConv constants. Upstream semconv reorganizations (stable → incubating moves) become breaking changes in your dashboards, not just in code.
  • Blacklist/sampling semantics (medium): regex-based Voter filtering is flexible but coarse; per-route or per-tenant tail-sampling policies likely need custom voters.

Key questions

  • Is the target application Symfony or Laravel? If Laravel, this package is at most a design reference.
  • Who is the actual maintainer (named humans, not org), and what is the release cadence over the last 12 months?
  • What license, and is there a CLA or contribution policy that permits our own patches?
  • Which open-telemetry/sdk and semconv versions are supported, and what is the upgrade policy?
  • Is the 2026-10-07 release real? What is the latest tagged version on Packagist?
  • Does the AI/GenAI instrumentation require optional packages we would need to adopt?

Integration Approach

Stack fit

  • Symfony 6.4/7.x + PHP 8.2+, Doctrine ORM, Messenger, HttpClient, Console: good fit; install and toggle per-subsystem via config. Start with tracing.request, tracing.doctrine, tracing.message.
  • Laravel: do not attempt a direct port. Options, in order of preference: (a) adopt a Laravel-native OTel package and use this repo's patterns (attribute provider, operation-name resolver, blacklist voter) as an internal design template; (b) if a Symfony service already exists in the estate, pilot there and keep Laravel out of scope. Bundling a Symfony kernel inside Laravel to host this is not a serious option.
  • Mixed estate: treat the bundle as the Symfony-side standard and require a shared semconv/resource attribute contract so traces from Laravel and Symfony services stitch together.

Migration path

  1. Read-only pilot on one non-critical Symfony service. Enable request + Doctrine only. Export to a staging collector.
  2. Validate the trace contract: span naming, service.name/deployment.environment resource attributes, and that HTTP client propagation works across one real service boundary.
  3. Expand to async: enable Messenger tracing and confirm context propagates producer → consumer; this is where most rollouts fail.
  4. Add metrics selectively: metrics are opt-in per feature (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.
  5. Codify internal extension points using the shipped skills: register a custom AttributeProvider and a blacklist voter for noisy endpoints/commands, then freeze that as an internal conventions doc.

Compatibility

  • Pin explicitly and treat open-telemetry/* as a coupled upgrade unit; add a CI job that runs the bundle's tests against your pinned SDK version.
  • Gate optional subsystems (GenAI, AI platform/agent/toolbox) behind interface_exists()/class_exists() — the bundle already does this, but your app must not hard-require those packages.
  • Verify OTel collector/exporter version compatibility independently; the bundle does not control export.

Sequencing

  • Weeks 1–2: license + maintainer diligence, Symfony-vs-Laravel decision, version/release-date verification, dependency-tree check against current SDK pins.
  • Weeks 2–3: single-service pilot (request + Doctrine), trace contract review.
  • Weeks 4–5: async (Messenger) propagation validation, first metrics enabled, sampling/blacklist tuned for volume.
  • Week 6+: rollout to remaining Symfony services; decide on internal fork/vendoring policy.

Operational Impact

Maintenance

  • Low code-surface maintenance if you stay on the happy path; the bundle is config-driven. The real cost is upstream drift: OTel PHP SDK and semconv upgrades will periodically require bundle bumps or a local patch. Budget a recurring dependency-review line item, not a one-off.
  • Because the repo enforces conventions via 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

  • Support risk is the headline: 28 stars, 0 dependents, single-vendor stewardship, no visible community. Assume no vendor SLA. Plan for the realistic outcome of self-support: fork the repo, keep it on your own Git remote, and carry patch responsibility.
  • Mitigant: the code is small, idiomatic Symfony, and convention-documented, so forking is tractable. Do a 1–2 day code-read before committing.

Scaling

  • Instrumentation overhead is generally negligible relative to request/DB time; the practical scaling concern is span volume and cost, not CPU. Use the built-in blacklist voters to suppress health checks, high-frequency internal calls, and noisy commands before going org-wide.
  • Metrics cardinality is the bigger risk: ensure attribute sets on counters/histograms don't include high-cardinality dimensions (user IDs, URLs with path params).

Failure modes

  • Framework mismatch: attempting Laravel integration → wasted sprint.
  • Span leaks in deferred/async paths — mitigated by the destructor backstop, but verify in your own custom instrumentations.
  • Broken trace propagation across Messenger/HTTP boundaries — surfaces as disconnected traces, silent and easy to miss; validate explicitly.
  • Silent config drift: metrics.<feature>.enabled defaults to false, so metrics can be "on" in the plan and absent in production.
  • Upgrade deadlock: bundle pinned to an older open-telemetry/sdk than another dependency requires.
  • Abandonment: upstream goes quiet; you own the fork with no upstream security patches.
  • Dashboard breakage from semconv constant renames after an upgrade.

Ramp-up

  • Symfony engineers: roughly 1–2 days to be productive — config toggles are simple; the learning curve is OpenTelemetry concepts (context propagation, sampling, semconv), not this bundle.
  • Platform/observability owners: ~1 week to own the trace contract, sampling policy, and collector pipeline.
  • Laravel engineers: not applicable without the framework decision above.
  • Recommend a short internal design note covering: chosen resource attributes, span-naming contract (via OperationNameResolver), blacklist policy, and the fork/vendoring policy — this is what makes the rollout survivable if upstream stalls.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator