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

[Tracing] Transaction module doesn't respect logger config #1361

Closed
d-kononov opened this issue Mar 24, 2021 · 3 comments · Fixed by #1363
Closed

[Tracing] Transaction module doesn't respect logger config #1361

d-kononov opened this issue Mar 24, 2021 · 3 comments · Fixed by #1363
Assignees

Comments

@d-kononov
Copy link

Describe the bug
Tracing doesn't respect logger config.

To Reproduce
Current config:

Sentry.init do |config|
  config.breadcrumbs_logger = [:active_support_logger]
  config.release = ENV.fetch('APP_VERSION', 'unknown')
  config.excluded_exceptions = [
    'SignalException'
  ]
  config.logger = Sentry::Logger.new(STDOUT)
  config.logger.level = Sentry::Logger::ERROR

  return if Rails.env.development? || Rails.env.test?
  config.traces_sampler = lambda do |sampling_context|
    transaction = sampling_context[:transaction_context]
    !transaction[:name].empty? && transaction[:name].include?('health_check') ? 0 : 0.7
  end
end

Expected behavior
Transaction module should respect config.logger and config.logger.level

Actual behavior
There are a lot of debug logs produced by Transaction module with config given in upper section.
https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/lib/sentry/transaction.rb#L118

Environment

  • Ruby Version: 2.7.1
  • SDK Version: 4.3.2
  • Integration Versions (if any): Rails 6.0.3.2
@st0012
Copy link
Collaborator

st0012 commented Mar 24, 2021

the active_support_logger doesn't capture data from a logger.
it logs data from ActiveSupport's instrumentation, which doesn't have a log as log level.

if you're using sentry-ruby 4.3.1, you can use config.before_breadcrumb to filter out the data you want to exclude.

@st0012
Copy link
Collaborator

st0012 commented Mar 24, 2021

sorry that I misread your description 😬 I'll investigate the cause

@d-kononov
Copy link
Author

Thanks!

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

Successfully merging a pull request may close this issue.

3 participants