Skip to main content
After installation, publish the configuration file to config/opentelemetry.php:
php artisan vendor:publish --provider="Keepsuit\LaravelOpenTelemetry\LaravelOpenTelemetryServiceProvider" --tag="opentelemetry-config"
The sections below document every option in the published config file.

Root options

disabled
boolean
default:"false"
When true, the OpenTelemetry SDK is disabled entirely. No traces, metrics, or logs are collected or exported. Reads from OTEL_SDK_DISABLED.
service_name
string
default:"slugified APP_NAME"
The logical name of this service, reported on all telemetry data. Reads from OTEL_SERVICE_NAME. Defaults to a URL-safe slug of your APP_NAME environment variable.
service_instance_id
string | null
default:"null"
A unique identifier for this specific instance of the service. Useful when running multiple replicas. If not set, a random ID is generated per request. Reads from OTEL_SERVICE_INSTANCE_ID.
resource_attributes
array
default:"[]"
Additional key-value pairs added as resource attributes to all telemetry data. By default, the value is parsed from the OTEL_RESOURCE_ATTRIBUTES environment variable using the standard key1=value1,key2=value2 format.
user_context
boolean
default:"true"
When enabled, the authenticated user’s ID is automatically added as user.id on root trace spans and log records. Reads from OTEL_USER_CONTEXT. You can customize the attributes via a resolver callback — see User context.
propagators
string
default:"tracecontext"
Comma-separated list of context propagators. Reads from OTEL_PROPAGATORS. Supported values: tracecontext, baggage, b3, b3multi, none.

metrics

Configuration for the OpenTelemetry Meter.
metrics.exporter
string
default:"otlp"
Key of the exporter to use for metrics. Must correspond to an entry in the exporters section. Reads from OTEL_METRICS_EXPORTER. Supported built-in drivers: otlp, console, memory, null.

traces

Configuration for distributed tracing.
traces.exporter
string
default:"otlp"
Key of the exporter to use for traces. Must correspond to an entry in the exporters section. Reads from OTEL_TRACES_EXPORTER. Supported built-in drivers: otlp, zipkin, console, memory, null.

traces.sampler

traces.sampler.parent
boolean
default:"true"
When true, wraps the configured sampler in a ParentBasedSampler. This causes the sampling decision to follow the parent span’s decision when one exists. Reads from OTEL_TRACES_SAMPLER_PARENT.
traces.sampler.type
string
default:"always_on"
The head sampler type. Reads from OTEL_TRACES_SAMPLER_TYPE. Supported values:
  • always_on — sample every trace
  • always_off — sample no traces
  • traceidratio — probabilistic sampling based on trace ID
traces.sampler.args.ratio
number
default:"0.05"
Sampling ratio used when type is traceidratio. A value of 0.05 means 5% of traces are sampled. Reads from OTEL_TRACES_SAMPLER_TRACEIDRATIO_RATIO.

traces.sampler.tail_sampling

Tail sampling makes decisions after a trace has completed, allowing you to keep only meaningful traces. See Sampling for a full explanation.
Application-level tail sampling is intended for single-service deployments. For multi-service tail sampling, use the OpenTelemetry Collector instead.
traces.sampler.tail_sampling.enabled
boolean
default:"false"
Enables tail sampling. When true, sampling decisions are deferred until the trace ends (or decision_wait expires). Reads from OTEL_TRACES_TAIL_SAMPLING_ENABLED.
traces.sampler.tail_sampling.decision_wait
integer
default:"5000"
Maximum time in milliseconds to wait for a trace to complete before making a sampling decision. Reads from OTEL_TRACES_TAIL_SAMPLING_DECISION_WAIT.
traces.sampler.tail_sampling.rules
array
Ordered map of rule classes to their options. Rules are evaluated in order; the first rule that returns Keep or Drop determines the outcome. If no rule decides, the configured head sampler is used.Built-in rules:
  • ErrorsRule — keeps traces that contain any span with an error status. Set to true/false or pass ['enabled' => true].
  • SlowTraceRule — keeps traces exceeding a duration threshold. Accepts ['enabled' => true, 'threshold_ms' => 2000].

traces.processors

traces.processors
array
default:"[]"
List of additional span processor class names to register. Each class must implement OpenTelemetry\SDK\Trace\SpanProcessorInterface.
'processors' => [
    YourCustomSpanProcessor::class,
],

logs

Configuration for the OpenTelemetry logs pipeline.
logs.exporter
string
default:"otlp"
Key of the exporter to use for logs. Must correspond to an entry in the exporters section. Reads from OTEL_LOGS_EXPORTER. Supported built-in drivers: otlp, console, memory, null.
logs.inject_trace_id
boolean
default:"true"
When true, the active trace ID is injected into Laravel’s log context. This correlates log entries from non-OpenTelemetry loggers with the active trace.
When using the otlp log channel, the trace ID is always attached to the log record regardless of this setting.
logs.trace_id_field
string
default:"trace_id"
The key name used when injecting the trace ID into the log context.
logs.processors
array
default:"[]"
List of additional log record processor class names to register. Each class must implement OpenTelemetry\SDK\Logs\LogRecordProcessorInterface.
'processors' => [
    YourCustomLogRecordProcessor::class,
],

exporters

Defines named exporter configurations that signals reference by key. You can define multiple exporters of the same driver type with different options (for example, different endpoints for different signals). Supported drivers: otlp, zipkin (traces only), console, memory, null.

exporters.otlp

exporters.otlp.driver
string
default:"otlp"
Identifies this as an OTLP exporter.
exporters.otlp.endpoint
string
default:"http://localhost:4318"
Base URL of the OTLP receiver. Reads from OTEL_EXPORTER_OTLP_ENDPOINT.
exporters.otlp.protocol
string
default:"http/protobuf"
Default transport protocol. Reads from OTEL_EXPORTER_OTLP_PROTOCOL. Supported values: grpc, http/protobuf, http/json.
exporters.otlp.max_retries
integer
default:"3"
Number of retry attempts on transient failures. Reads from OTEL_EXPORTER_OTLP_MAX_RETRIES.
exporters.otlp.traces_timeout
integer
default:"10000"
Timeout in milliseconds for trace export requests. Reads from OTEL_EXPORTER_OTLP_TRACES_TIMEOUT, falling back to OTEL_EXPORTER_OTLP_TIMEOUT.
exporters.otlp.traces_headers
string
default:""
Additional HTTP headers for trace export requests, in key=value,key=value format. Reads from OTEL_EXPORTER_OTLP_TRACES_HEADERS, falling back to OTEL_EXPORTER_OTLP_HEADERS.
exporters.otlp.traces_protocol
string | null
default:"null"
Override the transport protocol for trace exports only. Reads from OTEL_EXPORTER_OTLP_TRACES_PROTOCOL. Falls back to protocol when not set.
exporters.otlp.metrics_timeout
integer
default:"10000"
Timeout in milliseconds for metrics export requests. Reads from OTEL_EXPORTER_OTLP_METRICS_TIMEOUT, falling back to OTEL_EXPORTER_OTLP_TIMEOUT.
exporters.otlp.metrics_headers
string
default:""
Additional HTTP headers for metrics export requests, in key=value,key=value format. Reads from OTEL_EXPORTER_OTLP_METRICS_HEADERS, falling back to OTEL_EXPORTER_OTLP_HEADERS.
exporters.otlp.metrics_protocol
string | null
default:"null"
Override the transport protocol for metrics exports only. Reads from OTEL_EXPORTER_OTLP_METRICS_PROTOCOL. Falls back to protocol when not set.
exporters.otlp.metrics_temporality
string | null
default:"null"
Preferred aggregation temporality for exported metrics. Reads from OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE. Supported values: Delta, Cumulative. When not set, the SDK and exporter defaults apply.
exporters.otlp.logs_timeout
integer
default:"10000"
Timeout in milliseconds for log export requests. Reads from OTEL_EXPORTER_OTLP_LOGS_TIMEOUT, falling back to OTEL_EXPORTER_OTLP_TIMEOUT.
exporters.otlp.logs_headers
string
default:""
Additional HTTP headers for log export requests, in key=value,key=value format. Reads from OTEL_EXPORTER_OTLP_LOGS_HEADERS, falling back to OTEL_EXPORTER_OTLP_HEADERS.
exporters.otlp.logs_protocol
string | null
default:"null"
Override the transport protocol for log exports only. Reads from OTEL_EXPORTER_OTLP_LOGS_PROTOCOL. Falls back to protocol when not set.

exporters.zipkin

Zipkin is supported for traces only.
exporters.zipkin.driver
string
default:"zipkin"
Identifies this as a Zipkin exporter.
exporters.zipkin.endpoint
string
default:"http://localhost:9411"
Base URL of the Zipkin server. The path /api/v2/spans is appended automatically. Reads from OTEL_EXPORTER_ZIPKIN_ENDPOINT.
exporters.zipkin.timeout
integer
default:"10000"
Timeout in milliseconds for export requests. Reads from OTEL_EXPORTER_ZIPKIN_TIMEOUT.
exporters.zipkin.max_retries
integer
default:"3"
Number of retry attempts on transient failures. Reads from OTEL_EXPORTER_ZIPKIN_MAX_RETRIES.

instrumentation

Controls which built-in instrumentations are active and their options. The key is the instrumentation class name; the value is either a boolean or an options array containing at minimum enabled.
Automatically traces incoming HTTP requests by registering a middleware globally.
instrumentation.HttpServerInstrumentation.enabled
boolean
default:"true"
Enable or disable this instrumentation. Reads from OTEL_INSTRUMENTATION_HTTP_SERVER.
instrumentation.HttpServerInstrumentation.excluded_paths
array
default:"[]"
List of URL paths to exclude from tracing.
instrumentation.HttpServerInstrumentation.excluded_methods
array
default:"[]"
List of HTTP methods to exclude from tracing (e.g., HEAD, OPTIONS).
instrumentation.HttpServerInstrumentation.allowed_headers
array
default:"[]"
Request/response headers to capture and include in the span attributes.
instrumentation.HttpServerInstrumentation.sensitive_headers
array
default:"[]"
Headers present in allowed_headers whose values should be redacted.
instrumentation.HttpServerInstrumentation.sensitive_query_parameters
array
default:"[]"
Query parameter names whose values should be redacted from the span.
Automatically traces outgoing HTTP requests made with Laravel’s Http facade.
instrumentation.HttpClientInstrumentation.enabled
boolean
default:"true"
Enable or disable this instrumentation. Reads from OTEL_INSTRUMENTATION_HTTP_CLIENT.
instrumentation.HttpClientInstrumentation.manual
boolean
default:"false"
When true, tracing is opt-in per request. You must call Http::withTrace()->get(...) to trace a specific request.
instrumentation.HttpClientInstrumentation.allowed_headers
array
default:"[]"
Request/response headers to capture and include in the span attributes.
instrumentation.HttpClientInstrumentation.sensitive_headers
array
default:"[]"
Headers present in allowed_headers whose values should be redacted.
instrumentation.HttpClientInstrumentation.sensitive_query_parameters
array
default:"[]"
Query parameter names whose values should be redacted from the span.
Traces each database query as an individual span.Set to true/false or an array with enabled. Reads from OTEL_INSTRUMENTATION_QUERY.
Traces queue job dispatch (as a PRODUCER span) and execution (as a CONSUMER span).Set to true/false or an array with enabled. Reads from OTEL_INSTRUMENTATION_QUEUE.
Traces each Redis command as an individual span.Set to true/false or an array with enabled. Reads from OTEL_INSTRUMENTATION_REDIS.
Records cache operations as events on the current active span.Set to true/false or an array with enabled. Reads from OTEL_INSTRUMENTATION_CACHE.
Records Laravel events as events on the current active span.
instrumentation.EventInstrumentation.enabled
boolean
default:"true"
Enable or disable this instrumentation. Reads from OTEL_INSTRUMENTATION_EVENT.
instrumentation.EventInstrumentation.excluded
array
default:"[]"
List of event class names to exclude from recording.
Creates a span for each view rendered by Laravel.Set to true/false or an array with enabled. Reads from OTEL_INSTRUMENTATION_VIEW.
Creates a span for each Livewire component render.Set to true/false or an array with enabled. Reads from OTEL_INSTRUMENTATION_LIVEWIRE.
Traces Artisan commands. Commands are not traced by default — you must list them explicitly.
instrumentation.ConsoleInstrumentation.enabled
boolean
default:"true"
Enable or disable this instrumentation. Reads from OTEL_INSTRUMENTATION_CONSOLE.
instrumentation.ConsoleInstrumentation.commands
array
default:"[]"
List of commands to trace. Accepts command signatures (e.g., app:sync) or fully-qualified class names.
'commands' => [
    'app:sync',
    \App\Console\Commands\ProcessOrders::class,
],
Traces Laravel Scout search, update, and delete operations.
Requires the opentelemetry PHP extension and Laravel Scout 10.23+.
Set to true/false or an array with enabled. Reads from OTEL_INSTRUMENTATION_SCOUT.

worker_mode

Configuration for long-running process support (Octane, Horizon, queue workers). Worker mode is detected automatically using the configured detectors.
worker_mode.flush_after_each_iteration
boolean
default:"false"
When true, all telemetry data is flushed at the end of each iteration (HTTP request, queue job). When false, data is batched and flushed periodically or on process shutdown. Reads from OTEL_WORKER_MODE_FLUSH_AFTER_EACH_ITERATION.
Set to true if you need guaranteed delivery per request at the cost of higher export overhead.
worker_mode.metrics_collect_interval
integer
default:"60"
Interval in seconds at which metrics are collected and exported when running in worker mode. Ignored when flush_after_each_iteration is true. The actual interval may be slightly longer since the check occurs after each iteration. Reads from OTEL_WORKER_MODE_COLLECT_INTERVAL.
worker_mode.detectors
array
Ordered list of detector class names used to identify whether the application is running in worker mode. Detectors are checked in order; the first one that returns true activates worker mode.Built-in detectors:
  • OctaneWorkerModeDetector — detects Laravel Octane
  • QueueWorkerModeDetector — detects Laravel default queue worker and Horizon
Custom detectors must implement WorkerModeDetectorInterface.

Full config file

<?php

use Illuminate\Support\Str;
use Keepsuit\LaravelOpenTelemetry\Instrumentation;
use Keepsuit\LaravelOpenTelemetry\Support\ResourceAttributesParser;
use Keepsuit\LaravelOpenTelemetry\TailSampling;
use Keepsuit\LaravelOpenTelemetry\WorkerMode;
use OpenTelemetry\SDK\Common\Configuration\Variables;

return [
    /**
     * When set to true, Opentelemetry SDK will be disabled
     */
    'disabled' => env(Variables::OTEL_SDK_DISABLED, false),

    /**
     * Service name
     */
    'service_name' => env(Variables::OTEL_SERVICE_NAME, Str::slug((string) env('APP_NAME', 'laravel-app'))),

    /**
     * Service instance id
     * Should be unique for each instance of your service.
     * If not set, a random id will be generated on each request.
     */
    'service_instance_id' => env('OTEL_SERVICE_INSTANCE_ID'),

    /**
     * Additional resource attributes
     * Key-value pairs of resource attributes to add to all telemetry data.
     * By default, reads and parses OTEL_RESOURCE_ATTRIBUTES environment variable (which should be in the format 'key1=value1,key2=value2').
     */
    'resource_attributes' => ResourceAttributesParser::parse((string) env(Variables::OTEL_RESOURCE_ATTRIBUTES, '')),

    /**
     * Include authenticated user context on traces and logs.
     */
    'user_context' => env('OTEL_USER_CONTEXT', true),

    /**
     * Comma separated list of propagators to use.
     * Supports any otel propagator, for example: "tracecontext", "baggage", "b3", "b3multi", "none"
     */
    'propagators' => env(Variables::OTEL_PROPAGATORS, 'tracecontext'),

    /**
     * OpenTelemetry Meter configuration
     */
    'metrics' => [
        /**
         * Metrics exporter
         * This should be the key of one of the exporters defined in the exporters section
         * Supported drivers: "otlp", "console", "memory", "null"
         */
        'exporter' => env(Variables::OTEL_METRICS_EXPORTER, 'otlp'),
    ],

    /**
     * OpenTelemetry Traces configuration
     */
    'traces' => [
        /**
         * Traces exporter
         * This should be the key of one of the exporters defined in the exporters section
         * Supported drivers: "otlp", "zipkin", "console", "memory", "null"
         */
        'exporter' => env(Variables::OTEL_TRACES_EXPORTER, 'otlp'),

        /**
         * Traces sampler
         */
        'sampler' => [
            /**
             * Wraps the sampler in a parent based sampler
             */
            'parent' => env('OTEL_TRACES_SAMPLER_PARENT', true),

            /**
             * Sampler type
             * Supported values: "always_on", "always_off", "traceidratio"
             */
            'type' => env('OTEL_TRACES_SAMPLER_TYPE', 'always_on'),

            'args' => [
                /**
                 * Sampling ratio for traceidratio sampler
                 */
                'ratio' => env('OTEL_TRACES_SAMPLER_TRACEIDRATIO_RATIO', 0.05),
            ],

            'tail_sampling' => [
                'enabled' => env('OTEL_TRACES_TAIL_SAMPLING_ENABLED', false),
                // Maximum time to wait for the end of the trace before making a sampling decision (in milliseconds)
                'decision_wait' => (int) env('OTEL_TRACES_TAIL_SAMPLING_DECISION_WAIT', 5000),

                'rules' => [
                    TailSampling\Rules\ErrorsRule::class => env('OTEL_TRACES_TAIL_SAMPLING_RULE_KEEP_ERRORS', true),
                    TailSampling\Rules\SlowTraceRule::class => [
                        'enabled' => env('OTEL_TRACES_TAIL_SAMPLING_RULE_SLOW_TRACES', true),
                        'threshold_ms' => (int) env('OTEL_TRACES_TAIL_SAMPLING_SLOW_TRACES_THRESHOLD_MS', 2000),
                    ],
                ],
            ],
        ],

        /**
         * Traces span processors.
         * Processors classes must implement OpenTelemetry\SDK\Trace\SpanProcessorInterface
         *
         * Example: YourTracesSpanProcessor::class
         */
        'processors' => [],
    ],

    /**
     * OpenTelemetry logs configuration
     */
    'logs' => [
        /**
         * Logs exporter
         * This should be the key of one of the exporters defined in the exporters section
         * Supported drivers: "otlp", "console", "memory", "null"
         */
        'exporter' => env(Variables::OTEL_LOGS_EXPORTER, 'otlp'),

        /**
         * Inject active trace id in log context
         *
         * When using the OpenTelemetry logger, the trace id is always injected in the exported log record.
         * This option allows to inject the trace id in the log context for other loggers.
         */
        'inject_trace_id' => true,

        /**
         * Context field name for trace id
         */
        'trace_id_field' => 'trace_id',

        /**
         * Logs record processors.
         * Processors classes must implement OpenTelemetry\SDK\Logs\LogRecordProcessorInterface
         *
         * Example: YourLogRecordProcessor::class
         */
        'processors' => [],
    ],

    /**
     * OpenTelemetry exporters
     *
     * Here you can configure exports used by metrics, traces and logs.
     * If you want to use the same protocol with different endpoints,
     * you can copy the exporter with a different and change the endpoint
     *
     * Supported drivers: "otlp", "zipkin" (only traces), "console", "memory", "null"
     */
    'exporters' => [
        'otlp' => [
            'driver' => 'otlp',
            'endpoint' => env(Variables::OTEL_EXPORTER_OTLP_ENDPOINT, 'http://localhost:4318'),
            /**
             * Supported protocols: "grpc", "http/protobuf", "http/json"
             */
            'protocol' => env(Variables::OTEL_EXPORTER_OTLP_PROTOCOL, 'http/protobuf'),
            'max_retries' => (int) env('OTEL_EXPORTER_OTLP_MAX_RETRIES', 3),
            'traces_timeout' => (int) env(Variables::OTEL_EXPORTER_OTLP_TRACES_TIMEOUT, env(Variables::OTEL_EXPORTER_OTLP_TIMEOUT, 10000)),
            'traces_headers' => (string) env(Variables::OTEL_EXPORTER_OTLP_TRACES_HEADERS, env(Variables::OTEL_EXPORTER_OTLP_HEADERS, '')),
            /**
             * Override protocol for traces export
             */
            'traces_protocol' => env(Variables::OTEL_EXPORTER_OTLP_TRACES_PROTOCOL),
            'metrics_timeout' => (int) env(Variables::OTEL_EXPORTER_OTLP_METRICS_TIMEOUT, env(Variables::OTEL_EXPORTER_OTLP_TIMEOUT, 10000)),
            'metrics_headers' => (string) env(Variables::OTEL_EXPORTER_OTLP_METRICS_HEADERS, env(Variables::OTEL_EXPORTER_OTLP_HEADERS, '')),
            /**
             * Override protocol for metrics export
             */
            'metrics_protocol' => env(Variables::OTEL_EXPORTER_OTLP_METRICS_PROTOCOL),
            /**
             * Preferred metrics temporality
             * Supported values: "Delta", "Cumulative"
             */
            'metrics_temporality' => env(Variables::OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE),
            'logs_timeout' => (int) env(Variables::OTEL_EXPORTER_OTLP_LOGS_TIMEOUT, env(Variables::OTEL_EXPORTER_OTLP_TIMEOUT, 10000)),
            'logs_headers' => (string) env(Variables::OTEL_EXPORTER_OTLP_LOGS_HEADERS, env(Variables::OTEL_EXPORTER_OTLP_HEADERS, '')),
            /**
             * Override protocol for logs export
             */
            'logs_protocol' => env(Variables::OTEL_EXPORTER_OTLP_LOGS_PROTOCOL),
        ],

        'zipkin' => [
            'driver' => 'zipkin',
            'endpoint' => env(Variables::OTEL_EXPORTER_ZIPKIN_ENDPOINT, 'http://localhost:9411'),
            'timeout' => env(Variables::OTEL_EXPORTER_ZIPKIN_TIMEOUT, 10000),
            'max_retries' => (int) env('OTEL_EXPORTER_ZIPKIN_MAX_RETRIES', 3),
        ],
    ],

    /**
     * List of instrumentation used for application tracing
     */
    'instrumentation' => [
        Instrumentation\HttpServerInstrumentation::class => [
            'enabled' => env('OTEL_INSTRUMENTATION_HTTP_SERVER', true),
            'excluded_paths' => [],
            'excluded_methods' => [],
            'allowed_headers' => [],
            'sensitive_headers' => [],
            'sensitive_query_parameters' => [],
        ],

        Instrumentation\HttpClientInstrumentation::class => [
            'enabled' => env('OTEL_INSTRUMENTATION_HTTP_CLIENT', true),
            'manual' => false,
            'allowed_headers' => [],
            'sensitive_headers' => [],
            'sensitive_query_parameters' => [],
        ],

        Instrumentation\QueryInstrumentation::class => env('OTEL_INSTRUMENTATION_QUERY', true),

        Instrumentation\RedisInstrumentation::class => env('OTEL_INSTRUMENTATION_REDIS', true),

        Instrumentation\QueueInstrumentation::class => env('OTEL_INSTRUMENTATION_QUEUE', true),

        Instrumentation\CacheInstrumentation::class => env('OTEL_INSTRUMENTATION_CACHE', true),

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

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

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

        Instrumentation\ConsoleInstrumentation::class => [
            'enabled' => env('OTEL_INSTRUMENTATION_CONSOLE', true),
            'commands' => [],
        ],

        Instrumentation\ScoutInstrumentation::class => env('OTEL_INSTRUMENTATION_SCOUT', true),
    ],

    /**
     * Worker mode detection configuration
     *
     * Detects worker modes (e.g., Octane, Horizon, Queue) and optimizes OpenTelemetry
     * behavior for long-running processes.
     */
    'worker_mode' => [
        /**
         * Flush after each iteration (e.g. http request, queue job).
         * If false, flushes are batched and executed periodically and on shutdown.
         */
        'flush_after_each_iteration' => env('OTEL_WORKER_MODE_FLUSH_AFTER_EACH_ITERATION', false),

        /**
         * Metrics collection interval in seconds.
         * When running in worker mode, metrics are collected and exported at this interval.
         * Note: This setting is ignored if 'flush_after_each_iteration' is true.
         * Note: The interval is checked after each iteration, so the actual interval may be longer
         */
        'metrics_collect_interval' => (int) env('OTEL_WORKER_MODE_COLLECT_INTERVAL', 60),

        /**
         * Detectors to use for worker mode detection
         *
         * Detectors are checked in order, the first one that returns true determines the mode.
         * Custom detectors implementing DetectorInterface can be added here.
         *
         * Built-in detectors:
         * - OctaneDetector: Detects Laravel Octane
         * - QueueDetector: Detects Laravel default queue worker and Laravel Horizon
         */
        'detectors' => [
            WorkerMode\Detectors\OctaneWorkerModeDetector::class,
            WorkerMode\Detectors\QueueWorkerModeDetector::class,
        ],
    ],
];

Build docs developers (and LLMs) love