the Laravel SDK exposes two different Sentry logging drivers with materially different behavior: sentry sends classic Sentry events/issues, while sentry_logs sends structured logs to Explore > Logs. right now the docs show the correct setup, but they do not clearly warn about the easy misconfiguration where users keep driver => 'sentry' or define a custom channel name and expect Logs product behavior.
reported by a Laravel user who configured LOG_STACK=single,sentry, SENTRY_ENABLE_LOGS=true, and a custom channel named sentry with driver => 'sentry'. logs appeared in Issues/Feed as events with (No error message) instead of in Explore > Logs. switching to a sentry_logs channel with driver => 'sentry_logs' fixed it immediately.
- verified behavior in code:
Log::extend('sentry', ...) registers the legacy event path via Sentry\Laravel\LogChannel: src/Sentry/Laravel/Features/LogIntegration.php:18-20
Log::extend('sentry_logs', ...) registers the structured logs path via Sentry\Laravel\Logs\LogChannel: src/Sentry/Laravel/Features/LogIntegration.php:22-24
- the service provider auto-registers both channels separately:
src/Sentry/Laravel/ServiceProvider.php:214-224
- the legacy
sentry channel uses SentryHandler, while sentry_logs uses LogsHandler: src/Sentry/Laravel/LogChannel.php:14-20, src/Sentry/Laravel/Logs/LogChannel.php:13-16
- verified docs today:
- Laravel logs setup already says
LOG_STACK=single,sentry_logs and manual config should use 'sentry_logs' => ['driver' => 'sentry_logs']: platform-includes/logs/setup/php.laravel.mdx:5-6, :41-45
- usage examples log directly to
Log::channel('sentry_logs'): platform-includes/logs/usage/php.laravel.mdx:11-12
- troubleshooting mentions stack/env checks and
\Sentry\logger()->info() tests, but does not explicitly call out the sentry vs sentry_logs distinction or likely symptom pattern: docs/platforms/php/guides/laravel/logs/index.mdx:46-76
- likely UX/docs gap:
- users coming from older Sentry Laravel event logging, or from generic Laravel channel naming patterns, can reasonably assume
driver => 'sentry' plus SENTRY_ENABLE_LOGS=true should land in Logs
- the docs do not plainly say that
sentry and sentry_logs are different drivers for different products
- when logs are routed through
sentry, the failure mode is confusing rather than obvious
suggested improvements:
- docs:
- add an explicit warning near setup:
driver => 'sentry' sends events/issues, not structured logs; use driver => 'sentry_logs' for Explore > Logs
- add a short migration note for users coming from older Laravel Sentry channel configs
- expand troubleshooting with a symptom-based note: if records appear in Issues/Feed or show
(No error message), check whether the app is still using the sentry channel instead of sentry_logs
- sdk/product UX:
- consider a warning when
SENTRY_ENABLE_LOGS=true is set but the app is using the legacy sentry channel without sentry_logs in the stack
- consider clearer naming or deprecation guidance for the legacy
sentry log driver to reduce ambiguity
Action taken on behalf of Sergiy Dybskiy.
the Laravel SDK exposes two different Sentry logging drivers with materially different behavior:
sentrysends classic Sentry events/issues, whilesentry_logssends structured logs to Explore > Logs. right now the docs show the correct setup, but they do not clearly warn about the easy misconfiguration where users keepdriver => 'sentry'or define a custom channel name and expect Logs product behavior.reported by a Laravel user who configured
LOG_STACK=single,sentry,SENTRY_ENABLE_LOGS=true, and a custom channel namedsentrywithdriver => 'sentry'. logs appeared in Issues/Feed as events with(No error message)instead of in Explore > Logs. switching to asentry_logschannel withdriver => 'sentry_logs'fixed it immediately.Log::extend('sentry', ...)registers the legacy event path viaSentry\Laravel\LogChannel:src/Sentry/Laravel/Features/LogIntegration.php:18-20Log::extend('sentry_logs', ...)registers the structured logs path viaSentry\Laravel\Logs\LogChannel:src/Sentry/Laravel/Features/LogIntegration.php:22-24src/Sentry/Laravel/ServiceProvider.php:214-224sentrychannel usesSentryHandler, whilesentry_logsusesLogsHandler:src/Sentry/Laravel/LogChannel.php:14-20,src/Sentry/Laravel/Logs/LogChannel.php:13-16LOG_STACK=single,sentry_logsand manual config should use'sentry_logs' => ['driver' => 'sentry_logs']:platform-includes/logs/setup/php.laravel.mdx:5-6,:41-45Log::channel('sentry_logs'):platform-includes/logs/usage/php.laravel.mdx:11-12\Sentry\logger()->info()tests, but does not explicitly call out thesentryvssentry_logsdistinction or likely symptom pattern:docs/platforms/php/guides/laravel/logs/index.mdx:46-76driver => 'sentry'plusSENTRY_ENABLE_LOGS=trueshould land in Logssentryandsentry_logsare different drivers for different productssentry, the failure mode is confusing rather than obvioussuggested improvements:
driver => 'sentry'sends events/issues, not structured logs; usedriver => 'sentry_logs'for Explore > Logs(No error message), check whether the app is still using thesentrychannel instead ofsentry_logsSENTRY_ENABLE_LOGS=trueis set but the app is using the legacysentrychannel withoutsentry_logsin the stacksentrylog driver to reduce ambiguityAction taken on behalf of Sergiy Dybskiy.