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

Laravel Server Timing Laravel Package

beyondcode/laravel-server-timing

Add Server-Timing headers to your Laravel responses so you can see exactly where time goes—middleware, database queries, and custom measurements—right in your browser's developer tools. A simple, fluent API lets you instrument any part of a request. No external services needed.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. beyondcode/laravel-server-timing occupies exactly one seam: the HTTP response pipeline. It ships a middleware plus a ServerTiming facade that appends W3C-standard Server-Timing headers to outgoing responses. It does not touch the ORM, queue, container internals, session, or persistence, so it composes with any Laravel application regardless of domain architecture and imposes no structural constraints on feature teams. From a TPM's seat, this is the ideal shape of a dependency to sponsor: one well-understood integration point, no blast radius beyond it, and no architectural argument to win before teams can try it. The MIT license removes procurement from the critical path entirely.

Integration feasibility. High and cheap. The work is composer require, registering ServerTimingMiddleware in the stack (the service provider and facade alias are auto-discovered, but the middleware is not auto-registered), optionally publishing config, and wrapping blocks of interest in ServerTiming::start() / stop() / addMeasure(). No migrations, no schema changes, no external service, no credentials, no infrastructure provisioning. The 1.7.0 release (2026-03-23) is a compatibility-only change — Laravel 13.x support via PR #42 — with no API or behavioural delta, which matters because it is simultaneously the version that unblocks teams planning the framework-major upgrade. The one mild negative signal is Dependents: 0: effectively no downstream ecosystem validation, so our own pilot is the proof, not someone else's production track record.

Technical risk. Low but not zero, concentrated in five areas:

  • Information disclosure. Timing data is client-visible to anyone who can read the response. Query counts, route/controller identifiers, and custom milestone labels can leak internal structure and are a genuine concern on multi-tenant or compliance-sensitive surfaces. This needs an explicit environment/auth gate, not an assumption that someone remembered the config.
  • Silent no-op. Missing or misordered middleware produces no header and no error. During debugging that reads as "no timing problem" rather than "instrumentation missing" — the most expensive failure mode because it produces false confidence.
  • Framework-major coupling. The support matrix tracks Laravel majors; every framework upgrade needs a matching package release. 1.7.0 is both the proof point and the cadence to plan around.
  • Observability overlap. Teams already on Telescope, OpenTelemetry, or a commercial APM risk duplicate instrumentation and two competing timing conventions running indefinitely.
  • Blind spots. Non-browser consumers — native mobile clients, third-party API consumers, CLI commands, scheduled jobs, queue workers — never see these headers. It must not be mistaken for coverage of all traffic, and it produces no historical baseline.

Key questions.

  1. Is emission intended in production at all, and does an environment/flag/auth gate already exist to enforce that — or are we relying on per-service discipline?
  2. Who owns the Laravel-major bump cadence for this package in our dependency policy, and what triggers it (framework upgrade PR vs. scheduled refresh)?
  3. Has the approved header set and milestone naming convention passed security/privacy review on our most sensitive surfaces?
  4. Do we standardise on Server-Timing as the short-term convention with OpenTelemetry as the agreed long-term target, so we don't fund two timing stories?
  5. What is the capped milestone set and naming convention (bounding cardinality, header size, and cross-service comparability)?
  6. Where in each service's middleware stack must this sit to actually wrap the request — including Octane and custom-kernel services — and who verifies ordering?

Integration Approach

Stack fit. Excellent for a Laravel/PHP estate and effectively zero-fit-cost elsewhere. Conventional service provider plus middleware, package discovery handles the provider and facade alias, no PHP extension requirements, no Node toolchain, no sidecar, no daemon. It works with global and route-group registration and behaves the same under the Laravel 11+ bootstrap/app.php style and the legacy app/Http/Kernel.php style — relevant if the estate spans majors.

Migration path. Additive and fully reversible. Pilot on one or two non-critical services, register the middleware for non-production only, instrument a deliberately small milestone set, and validate the DevTools waterfall (Network → request → Timing → Server Timing) against a known baseline such as TTFB. Rollback is middleware/config removal plus composer remove — no data migration, no backfill, no cleanup, no user-visible change. That reversibility is what makes this a safe ask of an already-loaded platform team.

Compatibility. Before pinning, confirm three things per service: (1) the package's composer.json floor for laravel/framework and PHP resolves against our lowest supported runtime — a service on Laravel 10 or below should be validated separately, not assumed equivalent; (2) registration style matches that service's Laravel major; (3) services with custom kernels, unusual middleware stacks, or long-running workers (Octane) still execute the middleware in the correct position. Given Dependents: 0, treat compatibility claims as untested by third parties and verify locally.

Sequencing.

  1. Record 1.7.0 in the dependency policy as the Laravel-13-viable version, and note it as the minimum for any service planning that upgrade.
  2. Pilot on a single non-production service with a named owner and a documented go/no-go check that includes the middleware-ordering verification.
  3. On success, standardise registration and the environment gate in the shared application skeleton or starter template. This is the highest-leverage step: it converts an ad-hoc install into a default with a known-good configuration, and it is the difference between a tool engineers use and a tool engineers each configure differently.
  4. Publish the milestone naming convention and capped milestone set alongside the rollout, so measurements stay comparable across services and header size stays bounded.
  5. Roll out to remaining services opportunistically on their next dependency refresh, not as a standalone migration project. There is no forcing function and no justification for spending a sprint on it.

Operational Impact

Maintenance. Minimal but non-zero, and lumpy rather than continuous. The realistic budget is one dependency bump per Laravel major, evidenced by 1.7.0 being a pure compatibility release with no feature content. The surface area is two files — facade and middleware — so the maintenance risk is version alignment, not code comprehension. Assign the bump to whoever owns framework upgrades, and add it as a line item on the Laravel-major upgrade checklist.

Support. Single-maintainer community package with no commercial SLA. That is acceptable for a developer-facing diagnostic convenience and unacceptable as load-bearing production infrastructure. Treat it as a disposable diagnostic aid: if it broke tomorrow, engineers lose a convenience, not a capability the business depends on. Write that framing into the dependency record explicitly, so nobody builds a workflow or a customer-facing report on top of it. The upstream response time on the Laravel 13 bump is reassuring but is not a contractual commitment.

Scaling. Favourable. Header emission is effectively O(1) per request with negligible CPU and a few hundred bytes of payload. No shared state, no storage, no cross-request coordination, so it scales horizontally with the app and requires no capacity planning or load-test cycle. The one caveat is cumulative header bloat: liberal custom milestones inflate every response and can approach proxy/CDN header-size limits. Cap the milestone set, enforce the naming convention, and consider per-environment scoping or sampling if overhead ever becomes measurable at traffic scale.

Failure modes.

  • Silent no-op. Middleware not registered, misordered, or shadowed by a response-terminating middleware produces no header and no error. Mitigate with a documented verification step in the onboarding note — one known URL, one expected header, checked as part of the pilot's go/no-go.
  • Post-upgrade breakage. A Laravel major bump without a matching package release leaves headers silently absent or throws. This is the primary predictable failure; make it a checklist item on every framework upgrade rather than something discovered mid-incident.
  • Inadvertent production exposure. Enabled without gating, it discloses internal timing, query counts, and route/controller identifiers to any client. Enforce the gate in the shared skeleton, not in per-service documentation.
  • Misreading absence as health. Because it is browser- and per-request-only, a clean DevTools panel says nothing about mobile, API, queue, or scheduled-job latency. Any performance narrative built on this package must explicitly scope its claim to browser-initiated web requests, or it will be used to answer questions it cannot answer.
  • Convention drift. Two teams naming the same span differently makes cross-service comparison meaningless. The naming convention published at rollout is the control; without it the tool degrades into per-team folklore.

Ramp-up. Near zero for any engineer already comfortable in browser DevTools: install, register, wrap a code block, read the waterfall. The real onboarding cost is judgement, not mechanics — teaching the milestone discipline (small, named, low-cardinality), the ordering verification, and the production gate. Budget a short written onboarding note and one demo per service rather than formal training.

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