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

Symfony Sdk Bundle Laravel Package

open-telemetry/symfony-sdk-bundle

Symfony bundle for integrating the OpenTelemetry PHP SDK into Symfony applications. It provides bundle configuration and container wiring for tracing, metrics, and logs, making it easier to instrument services and export telemetry through configured OpenTelemetry exporters such as OTLP.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Framing correction: despite the brief describing this as a "Laravel/PHP package," open-telemetry/symfony-sdk-bundle is a Symfony bundle for the OpenTelemetry PHP SDK. It targets Symfony's kernel/DI model (Bundle class, Extension::load(), configuration tree, compiler passes, kernel.request/kernel.response/console event subscribers). A Laravel application cannot consume it as-is. Treat the recommendation below as "adopt the SDK and its Laravel-side equivalent; treat this bundle as a reference implementation at most."

Architecture fit

  • Poor as a direct dependency for a Laravel stack. Laravel has no bundle discovery, no semantic config tree, and no Symfony event lifecycle; the bundle's primary value — auto-registration of instrumentation and a YAML/PHP config surface that maps to SDK builders — does not transfer.
  • The genuinely reusable layer is upstream: open-telemetry/sdk, open-telemetry/exporter-otlp, open-telemetry/sem-conv, and the contrib instrumentation packages. Those are framework-agnostic (PSR-18/PSR-17 based) and are what any Laravel wiring would sit on.
  • The OpenTelemetry PHP contrib org also publishes Laravel-specific instrumentation. For a Laravel target that is the fit-correct choice; this bundle is the fit-wrong one.

Integration feasibility

  • Direct install: not feasible without pulling Symfony HttpKernel/KernelEvents into a Laravel app — an unacceptable dependency-weight and event-loop conflict risk.
  • Reference-port: feasible and cheap. The bundle's config schema (service name, resource attributes, sampler, propagators, OTLP endpoint/headers/protocol, batch processor tuning) is a good specification to copy into a single config/telemetry.php + TelemetryServiceProvider.
  • Effort estimate for a reference-port spike: 3–5 engineer-days to a traced request and a propagated job, plus 1–2 weeks to a production-grade rollout with sampling and collector config.

Technical risk

  • Adoption risk — high. 12 stars and 0 dependents means effectively zero production evidence. No downstream users means no de facto compatibility testing against real apps; expect to be the first to hit edge cases.
  • Maintainer/bus-factor risk — high. Contrib repositories in this org are volunteer-maintained and turnover is common. Assume you own any fork.
  • Upstream churn — moderate/high. The OpenTelemetry PHP SDK has moved through frequent breaking changes across exporters, instrumentation registration, and propagator APIs. The bundle's value is partly in absorbing that churn; a hand-rolled Laravel adapter does not, so version pinning discipline is mandatory.
  • Auto-instrumentation fragility. Framework integrations hook event dispatchers and HTTP client middleware. In Laravel these collide with existing middleware priority, Octane's long-lived workers (static state, span leakage between requests), and queue worker lifecycles. Symfony's guarantees do not carry over.
  • Metadata anomaly. A release dated 2026-07-15 should be verified against Packagist before any dependency decision — the scraped fields (stars/dependents/last-release) are inconsistent enough that the score of 15 and opportunity of 44 should be read as "unproven, low signal," not as a quality verdict.
  • Low score interpretation. A 15/100 composite with an opportunity score of 44 reads as underserved niche with weak execution and no traction. That is an argument for building thin glue on the stable upstream SDK, not for adopting this package.

Key questions

  1. What is the exact open-telemetry/sdk version constraint, and is it aligned with the version the Laravel instrumentation packages require? A split constraint forces us to abandon one of them.
  2. Which exporters and transports are wired (OTLP/gRPC vs OTLP/HTTP+protobuf), and is ext-grpc required? This determines our base image and sidecar/agent topology.
  3. Does it register HTTP client, Doctrine/PDO, and Messenger instrumentation, and how does it handle CLI and long-running processes? That maps to our queue workers and Octane if we ever adopt it.
  4. What are the documented PHP and Symfony version support bounds, and is there a CI matrix we can read as a proxy for maintenance health?
  5. Is sampling head-based only, or is there a hook for parent-based sampling so we can defer ratio decisions to the Collector?
  6. License and CLA terms — contrib repos sometimes carry terms that complicate a vendored fork.

Integration Approach

Stack fit

  • Assume a Laravel 10/11 stack on PHP 8.2+. Fit verdict: do not install this bundle. Install the SDK and instrument through a first-party ServiceProvider, using this bundle only as a design reference for configuration shape and default resource attributes.
  • If the organization runs Symfony services alongside Laravel, the sane posture is bifurcated: Symfony services may adopt this bundle directly (it is the idiomatic path there); Laravel services use the Laravel instrumentation package plus shared collector configuration. Standardize at the OTLP contract and semantic conventions, not at the PHP package level. That is the only layer that survives either package being abandoned.

Migration path

  1. Baseline (week 1). Add open-telemetry/sdk + exporter-otlp + sem-conv. Create config/telemetry.php with OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_TRACES_SAMPLER, OTEL_PROPAGATORS. Bind a singleton TracerProvider in a TelemetryServiceProvider, registered late so it wraps other providers.
  2. Request tracing (week 1–2). Global middleware that extracts W3C traceparent from inbound headers, starts a root span, and injects the context into the Laravel container/log context so logs and spans correlate. Emit http.route, http.method, http.status_code per sem-conv — never raw URLs with IDs.
  3. Propagation across async (week 2–3). Serialize the active span context into queued job payloads and re-hydrate in JobProcessing. This is the single highest-value integration and the most commonly botched one; without it, traces terminate at the queue boundary and the investment is largely wasted.
  4. Dependency visibility (week 3). Instrument the DB query listener and the HTTP client (Guzzle) so cross-service calls produce child spans. Cap attribute cardinality explicitly.
  5. Sampling and cost control (week 3–4). Head sampling at a fixed low ratio in-app; move to tail sampling at the Collector once volume justifies it. Do not attempt per-tenant sampling logic in PHP.
  6. Retire the spike (ongoing). Keep the ServiceProvider thin (~200–300 LOC) so that if a mature Laravel-native package emerges, we swap the wiring and leave instrumentation call sites untouched.

Compatibility

  • Validate PSR-18/PSR-17 client discovery in the app container — Laravel's auto-resolution usually satisfies this, but Guzzle version drift breaks it.
  • Ensure no Symfony EventDispatcherInterface type hints leak into application code.
  • Confirm the container does not eagerly instantiate the tracer provider during config:cache or route:cache, when env vars may be absent.
  • Octane: flush and reset the provider on RequestTerminated; otherwise spans and baggage leak between requests.

Sequencing

  • Gate the whole effort behind a non-production spike on one low-risk service. Success criteria: end-to-end trace from ingress through a queued job to a downstream HTTP call, visible in the backend with correct parent-child relationships, and p99 latency regression under 2%.
  • Only after the spike passes do we standardize the config contract and roll to additional services. Do not parallelize the first two migrations; the contract will change.

Operational Impact

Maintenance

  • Owning the glue is the real cost. Budget roughly 0.2 FTE for the first quarter (config contract, propagation correctness, collector tuning) declining to ~0.05 FTE steady state. That is lower than the cost of maintaining a vendored fork of this bundle, which is the alternative if we insist on Symfony-style config in Laravel.
  • Pin the SDK and exporter to exact patch versions; upgrade deliberately, never via composer update. Upstream breaking changes land in minors.
  • Record the bundle's config schema in an ADR even though we do not use it. It is a defensible default set and saves us relitigating sampler/propagator choices.

Support

  • No commercial support and no meaningful community mass (12 stars). Escalation path is GitHub issues plus the OpenTelemetry PHP SIG Slack. Set expectations accordingly with stakeholders: we are early adopters, not customers.
  • Mitigating factor: vendor lock-in is to OTLP, an open protocol. Switching backends (Jaeger, Tempo, Honeycomb, Datadog OTLP ingest) is a config change, not a rewrite. That materially lowers the strategic risk of betting on an immature PHP client.

Scaling

  • Per-request cost is span allocation plus a batched export. Use BatchSpanProcessor with queue size and timeout tuned to traffic; never SimpleSpanProcessor in a request path.
  • Cost driver is span volume and attribute cardinality, not the package. Enforce a sem-conv allowlist on attributes and forbid user IDs, emails, full URLs, and SQL text as attribute values.
  • At high RPS, tail sampling at the Collector is mandatory; the PHP process should not be making sampling decisions that require cross-request state.

Failure modes

  1. Exporter backpressure. A slow or unreachable collector can stall requests if the exporter is synchronous or the queue blocks. Configure bounded queue, drop-on-full, and short timeouts; telemetry must degrade to lossy, never to latency.
  2. Silent trace fragmentation. Missing or mismatched traceparent propagation — especially across queues and Guzzle clients — produces traces that look healthy in isolation and are useless in aggregate. Add a synthetic check that asserts a known trace ID reaches the backend.
  3. Baggage/context leakage under Octane. Long-lived workers retain the previous span in scope; child spans attach to the wrong parent. Requires explicit scope teardown per request.
  4. Cardinality explosion. A single high-cardinality attribute (e.g., a path parameter left unnormalized) can multiply backend cost by an order of magnitude. Guard with a Collector processor that drops unknown attributes.
  5. Collector outage. Traces vanish. Acceptable, but the on-call runbook must state that dashboards will gap and that this is not an application incident.
  6. Middleware ordering conflict. Inserting tracing middleware ahead of auth means unauthenticated traffic is traced and potentially tagged with user attributes. Choose ordering deliberately.

Ramp-up

  • Engineers need ~2 days of enablement on OTel concepts that the package does not teach: context propagation, span kinds and parent-child semantics, semantic conventions, head vs. tail sampling, and what "resource" means. A Symfony bundle's docs assume this context; a Laravel team will not have it.
  • Symfony expertise is an active liability here — it will produce confident but wrong assumptions about lifecycle hooks. Ramp the team on the Laravel instrumentation package first, and treat this bundle as documentation of intent rather than a template to imitate line by line.
  • Recommend a written internal standard (naming, required attributes, sampling policy, propagation contract) before the second service is instrumented. Retrofitting conventions across services is significantly more expensive than establishing them once.
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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route