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

Google Cloud Trace Bundle Laravel Package

softspring/google-cloud-trace-bundle

A Symfony bundle that integrates Google Cloud Trace, adding distributed tracing to your PHP applications. It captures request spans and exports timing data to Google Cloud, helping you monitor latency, diagnose bottlenecks, and follow requests across services.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a Symfony bundle, not a Laravel package — that single fact governs the whole evaluation. It ships DI compiler passes, a Bundle class, and a kernel request listener; Laravel offers no equivalent extension point, so composer require succeeds and php artisan package:discover finds nothing to boot. As a TPM, treat the deliverable as capability transfer, not dependency adoption: the tracing logic (inbound X-Cloud-Trace-Context parsing, sampling, span export to the Cloud Trace API) is portable, the wiring is not. For a Symfony service the fit is native and cheap. For a Laravel estate the realistic options are a thin wrapper over google/cloud-trace, an OpenTelemetry + GCP exporter stack, or using this repo as a reference implementation. Recommend OTel as the default unless the target is Symfony.

Integration feasibility. Low effort on Symfony; moderate-to-high on Laravel with a permanent translation layer owned by us. There is no Laravel service provider, facade, or publishable config, so any plan assuming "drop-in" is wrong and should be corrected in the ticket. The authoritative spec is DependencyInjection/Configuration.php, not the README — that is where project id, sampler, enabled flags, and HTTP-client instrumentation are actually defined.

Technical risk.

  • Ecosystem mismatch (high). Upstream will never test our Laravel integration; every Symfony-side refactor becomes our migration.
  • Opaque release (medium). v5.6.0's notes are a compare link only — no features, deprecations, or BC callouts. Semver implies additive on a 5.x line, but that is an inference, not a sign-off. A config-tree rename in a point release is the most likely break and it fails silently in YAML consumers.
  • Non-critical-path infrastructure (medium). Trace export must never fail a request. Any integration has to wrap export in try/catch and degrade to no-op.
  • Licensing (medium). AGPL-3.0 is a copyleft license; confirm with legal before embedding in proprietary services, particularly if we fork or vendor a patched copy.
  • Adoption signal (low). Zero stars, single-maintainer namespace, no evidence of production users beyond the author's own products.

Key questions. What changed in the 5.5.10→5.6.0 diff — config keys, service IDs, minimum PHP/Symfony? Is there a stated 5.x support window? Is upstream's recommended path now OpenTelemetry? Who consumes this in production today? Does AGPL-3.0 clear our legal bar for a service-side dependency?

Integration Approach

Stack fit. Symfony: proceed, the bundle does what bundles are for and is cheaper than hand-rolling listeners plus exporter lifecycle. Laravel: do not install the bundle. Bind the tracer as a singleton in a TraceServiceProvider guarded on GOOGLE_CLOUD_PROJECT being set and APP_ENV not being local/testing, add a global middleware opening a root span from the inbound header and closing it in terminate(), and register a Guzzle/Http::withMiddleware hook injecting the outbound trace header. That outbound propagation is the highest day-to-day-value piece — it is what makes cross-service traces stitch together.

Migration path. Greenfield; nothing to migrate. That makes this the cheapest moment to pick the right abstraction. Choosing OTel now avoids a second migration later; choosing the Symfony bundle now locks in a framework boundary. Carry the trace header in queue job payloads via job middleware — the bundle does not address async work at all.

Compatibility. Pin and test the full GCP dependency set together. The transitive google/cloud-trace client is the likely conflict point with Pub/Sub, Storage, and Logging in the same process; do not let Composer resolve these independently. Verify the PHP floor and Symfony component constraints against our current LTS.

Sequencing.

  1. Read and record the actual 5.5.10→5.6.0 diff in the ticket — the changelog does not discharge this.
  2. Timebox a spike: install 5.5.10, confirm spans land in Cloud Trace, then bump to 5.6.0 and diff the output.
  3. Explicitly test exporter failure — point at a bad endpoint, confirm requests still succeed.
  4. Verify propagation across one synchronous service-to-service call.
  5. Roll out to one production service at a sampling rate well below 1.0.
  6. On the Laravel path, replace steps 2–4 with the wrapper build and add a hard gate: if the wrapper exceeds roughly a sprint, fall back to OTel. Do this spike in a scratch Symfony app or against the bundle's Tests/ fixtures before writing the provider.

Operational Impact

Maintenance. Single-maintainer, small-audience project; releases are cut but release communication is thin. Budget for reading diffs on every bump rather than trusting notes. Expect to carry our own patches — the mitigating factor is that the surface area is small, so forking or vendoring is viable.

Support. No vendor support and unknown upstream response time. Our stated fallback for an unfixed defect is fork-or-vendor; that needs to be a real, resourced option before adoption, not a hypothetical.

Scaling. Tracing volume, not request throughput, is the constraint. Exporting every span at high QPS is both latency and billing cost — set sampling intentionally at rollout and never inherit a 1.0 default. Watch batch export against the PHP-FPM lifecycle: short-lived requests can exit before flush, silently dropping spans; flush during terminate() and accept the tail-latency cost, or accept the loss. Measure request overhead with and without the instrumentation before committing to a rollout.

Failure modes.

  • Exporter unreachable or quota exceeded — must degrade to no-op; if it throws, telemetry takes down requests. Highest severity, most likely to slip through testing.
  • Credentials/project misconfiguration — the exporter relies on Application Default Credentials (metadata server on GKE/GCE, GOOGLE_APPLICATION_CREDENTIALS locally). Failures are silent: missing traces, not exceptions.
  • Malformed X-Cloud-Trace-Context — untrusted inbound input must not crash the request.
  • Span leakage in long-lived workers — Octane, Symfony Runtime, and queue workers need explicit per-job span cleanup.
  • Silent telemetry loss — the worst outcome is not an outage but traces quietly stopping. Alert on absence of spans, not just on errors.

Ramp-up. Symfony engineer fluent in the framework: under a day, mostly GCP IAM and getting spans to appear. Laravel team building the wrapper: one to two weeks including propagation testing and failure-mode hardening. On-call engineer debugging a tracing incident cold: this is the real risk — failures surface as either nothing (quiet loss) or unexplained latency, neither intuitive. Write the runbook and the "alert on missing spans" check before rollout, not after.

Recommendation. Do not adopt this release as a Laravel dependency. If the target is Symfony, proceed through the sequencing above with a pinned version and diff review each bump. If the target is Laravel, treat the repo as a specification, adopt OpenTelemetry with the GCP exporter, and gate any bespoke wrapper behind the one-sprint timebox.

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.
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
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle