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

Telescope Guzzle Watcher Laravel Package

muhammadhuzaifa/telescope-guzzle-watcher

Adds a Guzzle watcher to Laravel Telescope, recording outgoing HTTP client requests in the Telescope dashboard. Helps debug third-party API calls, headers, responses, and timing alongside your other Telescope entries.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is an extension of Laravel Telescope, not a standalone tool. It registers a custom Watcher that hooks Guzzle's on_stats request option and emits entries into Telescope's existing http_client entry type. This is the right architectural seam: it reuses Telescope's storage, pruning, filtering, and UI, so there is no parallel observability stack to staff or pay for.

It addresses a genuine gap. Telescope's built-in HTTP Client Watcher only sees requests issued through Laravel's Http facade. Traffic from directly-instantiated Guzzle clients — most third-party SDKs (AWS, Stripe, Elasticsearch, Google, carrier/vendor APIs) — is invisible. For teams debugging "why is checkout slow," that blind spot is usually where the answer lives. The value proposition is therefore diagnostic completeness, not new capability.

Integration feasibility. Mechanically simple: Composer install, publish config, register the watcher in config/telescope.php, and attach the option where Guzzle clients are constructed. Low engineering effort — call it hours, not days — with no schema changes and no data migration.

The friction is the opt-in model. Because interception is driven by a per-request option, the watcher only captures clients you explicitly instrument. Third-party SDKs that build their own client internally are not covered unless the SDK exposes a handler/config hook. This materially narrows the blast radius versus the marketing claim, and it should be validated against the specific SDKs on your critical path before committing.

Technical risk.

  • Double-logging. Laravel's Http facade runs on Guzzle. If the watcher attaches broadly, requests may be recorded twice — once natively, once by this watcher — inflating volume and muddying traces. Deduplication behavior is unverified.
  • Response body handling. PSR-7 bodies are streams. If the watcher reads them for logging, streamed downloads, SSE, and large binary responses can be truncated for the caller or ballooned in memory. on_stats alone yields transfer statistics, not bodies, so the description implies more interception than the stated hook provides. Confirm what is actually serialized.
  • Secret leakage. Outbound Guzzle calls carry bearer tokens and API keys in headers and bodies. Telescope's hide-parameter config is scoped to its own watchers; a custom watcher must implement its own redaction. This is the highest-severity risk and needs explicit sign-off.
  • Coupling to Telescope internals. Entry types, IncomingEntry shape, and watcher contracts have changed across Telescope majors. A small package tracking a large framework component is structurally exposed to breakage on upgrade.
  • Bus factor. One maintainer, 99 stars, zero dependents, low opportunity score. Effectively unproven at scale.

Key questions for the maintainer / spike.

  1. What exactly is captured — timing only, or full request/response bodies? Are streams consumed?
  2. Is there deduplication against Telescope's native HTTP Client Watcher?
  3. Which Telescope and Laravel versions are supported and tested in CI?
  4. What redaction controls exist for headers, query strings, and bodies?
  5. Does it fail open (request proceeds, log dropped) or fail closed on serialization errors?
  6. Is on_stats sufficient, or is middleware also injected — and if so, into whose handler stack?

Integration Approach

Stack fit. Targets Laravel with Telescope installed — practically Laravel 10/11/12 with Telescope 5.x and Guzzle 7. Prerequisite: Telescope's http_client entry type must exist in your installed version. On older Telescope majors this watcher has nothing to write into, so verify the entry type is present before scoping work.

Migration path. No migration in the data sense. Telescope entries land in the existing telescope_entries table under the http_client type. Rollback is a config flag — disable the watcher, or set TELESCOPE_ENABLED=false — with no code removal required. That reversibility is the strongest argument for a low-risk pilot.

Compatibility. Two dimensions to pin: (a) Telescope/PHP/Guzzle version matrix in composer.json, and (b) whether the SDK clients you actually care about expose a Guzzle handler or client injection point. The second is the real gate. An SDK that hides its transport cannot be instrumented by this package regardless of version compatibility.

Sequencing.

  1. Inventory outbound Guzzle usage — count call sites, identify which are Http facade (already covered) versus raw clients versus SDK-internal.
  2. Spike on one high-value, non-critical SDK client in staging. Confirm payload capture, redaction, and stream safety.
  3. Redact before enabling broadly: enumerate sensitive headers and body fields, verify they are stripped in stored entries.
  4. Deduplicate — confirm facade traffic is not recorded twice; scope the watcher narrowly if needed.
  5. Pilot in staging with entry-volume measurement, then a single low-traffic production service behind Telescope's standard environment gating.
  6. Codify — document the client-construction convention in the platform guide so new integrations are instrumented by default.

Operational Impact

Maintenance. Low routine effort, but meaningful upgrade exposure. Telescope majors are the trigger for re-validation. Given the single maintainer and zero dependents, plan for the possibility of abandonment: vendor the package or fork it internally as a contingency. The code surface is small enough that a fork is a realistic fallback rather than a rewrite.

Support. Standard Laravel/Telescope skill set. No new tooling, no new UI, no new on-call runbook beyond "check Telescope." That is the package's quiet advantage — it adds signal without adding a surface for the on-call rotation to learn. The cost is a dependency on a hobby-scale package for production diagnostics, which should be a conscious, documented decision.

Scaling. This is the primary operational concern and it is arithmetic, not speculation. Every instrumented outbound call becomes a Telescope row plus a JSON payload. A service making ~50 Guzzle calls/minute produces roughly 70k entries/day; at 2–10 KB per entry that is on the order of 150–700 MB/day of write amplification against your primary database. Mitigations, all mandatory rather than optional:

  • Schedule telescope:prune aggressively (24–48h retention for this entry type).
  • Gate the watcher by environment; never run it ungated in high-throughput production.
  • Scope it to specific slow or high-value integrations rather than global instrumentation.
  • Watch for write-latency impact on the primary DB — a separate Telescope connection is preferable.

Failure modes.

Mode Impact Mitigation
Serialization error on an exotic response Lost diagnostic, or worse if not fail-open Verify fail-open behavior; test with binary/streamed responses
Stream consumed by logging Truncated downloads, broken SSE, memory spikes Confirm before enabling; exclude streaming clients
Secret captured in entries Credential exposure in DB and Telescope UI Header/body redaction, verified by test
Telescope upgrade breaks watcher Silent loss of visibility Pin versions; add integration test on upgrade
Entry table bloat DB degradation, pruning backlog Aggressive prune schedule; volume alert
Package abandoned No upstream fixes Fork/vendor contingency

Ramp-up. Days. Any Laravel engineer who has used Telescope understands the output immediately, and installation is a Composer command plus config. The real ramp-up cost is not learning the tool but institutionalizing the discipline: redaction review, environment gating, and a client-construction convention so instrumentation isn't applied inconsistently across teams.

Verdict. Worth a scoped pilot. High diagnostic value, low integration cost, clean rollback — but the opt-in interception model, unverified body/stream handling, and secret-redaction requirements mean this should not be adopted fleet-wide without a staging spike and a documented fork contingency.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource