Performance monitoring
Cinder records how long parts of your application take to run. Traces follow the OpenTelemetry model:
An application starts a trace for a request, command, or job. A sampler decides whether that trace is sampled. When sampled, spans capture units of work (with optional parent/child relationships). Span events capture point-in-time details inside a span.
What is collected automatically
With tracing enabled, cinderwatch/cinder-laravel starts traces for:
- HTTP requests — middleware on the
webandapigroups (routespans) - Queued jobs — when a worker processes a job (
jobspans) - Artisan commands — one-off CLI invocations such as
schedule:run(commandspans) - Database queries — child spans while a sampled request, job, or command trace is active
- Outgoing HTTP — Laravel's
Httpclient, Saloon connectors, and Guzzle clients that useOutgoingHttpTraceRecorder::guzzleMiddleware()(child spans only while a trace is active; calls to your Cinder host are ignored)
Long-lived workers (queue:work, horizon:work, and similar) are not traced as commands. Each job they process is traced separately.
Sampled traces are posted to POST /api/v1/traces.
Ignoring noisy entry points
Apps that ship telemetry to themselves should ignore ingress handler jobs to avoid amplifying trace volume. In config/cinder.php:
'trace' => [
'ignore_jobs' => [
App\Jobs\StoreIngressTraceJob::class,
// ...
],
],
You can also pass a comma-separated list of job class names via CINDER_TRACE_IGNORE_JOBS. Default ignored Artisan commands include queue:work, queue:listen, horizon:work, and horizon:supervisor.
Sampling
Control volume with the sample rate:
CINDER_TRACE_SAMPLE_RATE=0.1
1 samples every trace; 0.1 samples roughly 10%.
Disabling performance monitoring
CINDER_TRACING_ENABLED=false
When disabled, tracing middleware, queue/command listeners, and the query listener are not registered.
Service identity
Set these so performance data is easy to filter in Cinder:
CINDER_SERVICE_NAME=billing-api
CINDER_SERVICE_VERSION=1.4.2
CINDER_STAGE=production