Skip to content

feat: ungate logs and metrics - #2187

Merged
Litarnus merged 1 commit into
masterfrom
deprecate-enable-logs-metrics
Aug 27, 2026
Merged

Litarnus merged 1 commit into
masterfrom
deprecate-enable-logs-metrics

Conversation

@Litarnus

Copy link
Copy Markdown
Contributor

Deprecates and changes enable_logs and enable_metrics to be effectively no-ops. The reason for this change is that those flags were basically just kill switches for the entire feature and disabled by default.
Users had to

  1. add a log handler or call log functions directly and
  2. enable the log feature to make sure they arrive.

Metrics are even more explicit since one has to invoke functions to emit metrics and we don't have any integrations.

Once this is merged, adding a handler or calling a log/metric function will be considered as a signal that this type of telemetry is wanted, and we will no longer respect the flag.

For anyone using those flags as kill switches: it's possible to implement kill switches using before_send_log and before_send_metric and return null in those callbacks.

@Litarnus
Litarnus merged commit 3f15351 into master Aug 27, 2026
53 checks passed
@Litarnus
Litarnus deleted the deprecate-enable-logs-metrics branch August 27, 2026 11:49
@Branlute

Copy link
Copy Markdown

@Litarnus

Copy link
Copy Markdown
Contributor Author

Hello, could you update the official documentation and the Symfony bundle that still uses this feature? https://docs.sentry.io/platforms/php/logs/#setup https://docs.sentry.io/platforms/php/guides/symfony/configuration/options/#enable_logs https://github.com/getsentry/sentry-symfony/blob/master/src/DependencyInjection/Configuration.php#L91

Hi! I updated the docs and we will remove the option in the next major, otherwise we might crash user applications if they still define it and we don't expect it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants