Automatic Instrumentation
Learn what instrumentation automatically captures transactions.
The Laravel SDK automatically instruments your application to capture transactions and adds spans for the following features:
- Views
- Queue jobs
- Caches (when using Laravel v11.11.0 or higher)
- Notifications
- Database queries
- Redis operations
- Laravel HTTP Client requests (when using Laravel v8.45.0 or higher)
Automatic instrumentation is also available with the following packages:
- Lighthouse GraphQL operations
- Laravel Folio page based routes
- Laravel Livewire components
- Laravel AI agent invocations, LLM requests, tool executions, and embeddings (see Agent Tracing)
The Laravel SDK is also capable of creating spans for filesystem access operations. You can enable this feature by wrapping the configuration for all disks with a call to Sentry\Laravel\Features\Storage\Integration::configureDisks():
config/filesystems.phpCopied
'disks' => Sentry\Laravel\Features\Storage\Integration::configureDisks([
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
// ...
], /* enableSpans: */ true, /* enableBreadcrumbs: */ true),
'disks' => Sentry\Laravel\Features\Storage\Integration::configureDisks([
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
// ...
], /* enableSpans: */ true, /* enableBreadcrumbs: */ true),
Alternatively, you can enable this feature only for select disks:
config/filesystems.phpCopied
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
's3' => Sentry\Laravel\Features\Storage\Integration::configureDisk('s3', [
// ...
], /* enableSpans: */ true, /* enableBreadcrumbs: */ true),
],
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
's3' => Sentry\Laravel\Features\Storage\Integration::configureDisk('s3', [
// ...
], /* enableSpans: */ true, /* enableBreadcrumbs: */ true),
],
By default, both spans and breadcrumbs are enabled. You may disable them by passing the second argument, $enableSpans, or the third argument, $enableBreadcrumbs.
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").