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
Issue Description
When enabling spotlight, the sentry configuration permits sending events to sentry through
sending_allowed?
regardless ofenabled_environments
. https://github.com/getsentry/sentry-ruby/blob/5.15.0/sentry-ruby/lib/sentry/configuration.rb#L463Not setting the
dsn
did not work as a workaround, sincesending_allowed?
also requires a valid DSN beforeSpotlightTransport.send_data
is invoked.Reproduction Steps
Set
config.spotlight
totrue
,config.dsn
to a valid DSN, and do not includeconfig.environment
inconfig.enabled_environments
. Trigger an event to be sent threough for exampleraise '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