Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending to sentry is always enabled when using spotlight #2226

Closed
william-stacken opened this issue Jan 11, 2024 · 0 comments · Fixed by #2231
Closed

Sending to sentry is always enabled when using spotlight #2226

william-stacken opened this issue Jan 11, 2024 · 0 comments · Fixed by #2231
Assignees

Comments

@william-stacken
Copy link

william-stacken commented Jan 11, 2024

Issue Description

When enabling spotlight, the sentry configuration permits sending events to sentry through sending_allowed? regardless of enabled_environments.
https://github.com/getsentry/sentry-ruby/blob/5.15.0/sentry-ruby/lib/sentry/configuration.rb#L463

Not setting the dsn did not work as a workaround, since sending_allowed? also requires a valid DSN before SpotlightTransport.send_data is invoked.

Reproduction Steps

Set config.spotlight to true, config.dsn to a valid DSN, and do not include config.environment in config.enabled_environments. Trigger an event to be sent threough for example raise 'test'.

Expected Behavior

Events are sent to the spotlight sidecar only, not sentry

Actual Behavior

Events are sent to both of them

Ruby Version

3.2.2

SDK Version

5.15

Integration and Its Version

Rails 7.0.5.1, sidekiq 6.1

Sentry Config

Sentry.init do |config|

Enable Sentry in production and conditionally in development

config.environment = 'development'
config.enabled_environments = ['production']

config.dsn = DSN

config.spotlight = true
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
2 participants