Skip to main content

Events

The Event instrumentation records Laravel events fired during a request or job as events on the current active span. This surfaces application-level event activity without adding extra spans to the trace. A single span event named event fired is added for each dispatched event, with the event attribute set to the fully-qualified event class name or string identifier.

Excluded Events

Many internal Laravel framework events are excluded by default to avoid noise:
  • Illuminate\*
  • Laravel\Octane\*
  • Laravel\Scout\*
  • Laravel\Horizon\*
  • eloquent*
  • bootstrapped* / bootstrapping*
  • creating* / composing*
You can exclude additional events using the excluded configuration option:
use Keepsuit\LaravelOpenTelemetry\Instrumentation;

'instrumentation' => [
    Instrumentation\EventInstrumentation::class => [
        'enabled' => env('OTEL_INSTRUMENTATION_EVENT', true),
        'excluded' => [
            \App\Events\SomeHighVolumeEvent::class,
        ],
    ],
],

Configuration Options

OptionTypeDescription
excludedstring[]Additional event class names or string identifiers to exclude from recording.

Disabling Events

OTEL_INSTRUMENTATION_EVENT=false
Alternatively, remove EventInstrumentation::class from the instrumentation array in config/opentelemetry.php.

Views

The View instrumentation traces Blade view rendering by wrapping the view engine resolver. Each rendered view produces a dedicated span, allowing you to identify slow or deeply nested view hierarchies.
  • Span name: The view name (e.g. users.index, components.button).
  • Span kind: INTERNAL

Configuration

In config/opentelemetry.php:
use Keepsuit\LaravelOpenTelemetry\Instrumentation;

'instrumentation' => [
    Instrumentation\ViewInstrumentation::class => env('OTEL_INSTRUMENTATION_VIEW', true),
],

Disabling Views

OTEL_INSTRUMENTATION_VIEW=false
Alternatively, remove ViewInstrumentation::class from the instrumentation array in config/opentelemetry.php.

Livewire

The Livewire instrumentation traces Livewire component lifecycle events (mount and hydrate/dehydrate cycles). Each component render produces a span named livewire component with component.name and component.id attributes.
This instrumentation is a no-op if the livewire/livewire package is not installed.

Configuration

In config/opentelemetry.php:
use Keepsuit\LaravelOpenTelemetry\Instrumentation;

'instrumentation' => [
    Instrumentation\LivewireInstrumentation::class => env('OTEL_INSTRUMENTATION_LIVEWIRE', true),
],

Disabling Livewire

OTEL_INSTRUMENTATION_LIVEWIRE=false
Alternatively, remove LivewireInstrumentation::class from the instrumentation array in config/opentelemetry.php.

Build docs developers (and LLMs) love