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.
X-Cloud-Trace-Context, how to propagate it outbound, and what span attribute names the GCP Trace UI actually renders. That converts a "buy" decision into a cheap "read and reimplement" decision — a much smaller scope ask than it first appears.Consider it (as a reference implementation) when:
Look elsewhere when:
php artisan package:discover finds nothing. Any ticket describing this as a "drop-in Laravel package" is wrong and should be corrected before engineering time is committed.Default recommendation: treat this as a read-only reference, adopt google/cloud-trace or OTel as the actual dependency, and put a hard timebox (roughly one sprint) on any wrapper work with a fallback to OTel if the box is exceeded.
For executives — the one-paragraph version: We evaluated a Google Cloud Trace integration for our PHP services. It is a mature-in-concept but niche Symfony component, and it does not work in our Laravel services without us writing and owning an adapter. The capability is worth having — without cross-service tracing, diagnosing "why is checkout slow" becomes guesswork across five systems. The package is not worth taking on as a dependency. Our recommendation is to adopt a framework-agnostic tracing library (OpenTelemetry) and use this package only as a reference for how to format trace headers so our services appear correctly in Google Cloud's console. Estimated cost: one to two engineering weeks, mostly in hardening, not in the happy path. This is a risk-reduction spend, not a feature spend — the value shows up the first time an incident crosses a service boundary.
For engineering — what we are actually asking for:
composer require this into a Laravel service and expect it to boot. It won't.terminate() so error responses still produce spans, and a Guzzle/Http::withMiddleware hook that injects the outbound header on every downstream call. That outbound propagation is the highest-value 50 lines in the whole project — it is what makes traces stitch across services instead of showing up as isolated islands.How can I help you explore Laravel packages today?