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

Add severity as sentry_logger's breadcrumb hint #1527

Merged
merged 2 commits into from
Aug 9, 2021
Merged

Conversation

st0012
Copy link
Collaborator

@st0012 st0012 commented Aug 8, 2021

This will allow users to filter sentry_logger's breadcrumbs with log level like:

config.before_breadcrumb = lambda do |breadcrumb, hint|
  if severity = hint[:severity] && severity <= 1 # debug & info
    nil
  else
    breadcrumb
  end    
end

@st0012 st0012 added this to the 4.7.0 milestone Aug 8, 2021
@st0012 st0012 self-assigned this Aug 8, 2021
@st0012 st0012 added this to In progress in 4.x via automation Aug 8, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2021

Codecov Report

Merging #1527 (ca0cc59) into master (1a47151) will increase coverage by 0.55%.
The diff coverage is 100.00%.

❗ Current head ca0cc59 differs from pull request most recent head f3794a8. Consider uploading reports for the commit f3794a8 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1527      +/-   ##
==========================================
+ Coverage   98.20%   98.76%   +0.55%     
==========================================
  Files         218      123      -95     
  Lines       10608     6779    -3829     
==========================================
- Hits        10418     6695    -3723     
+ Misses        190       84     -106     
Impacted Files Coverage Δ
sentry-ruby/lib/sentry-ruby.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/breadcrumb/sentry_logger.rb 100.00% <100.00%> (ø)
...-ruby/spec/sentry/breadcrumb/sentry_logger_spec.rb 100.00% <100.00%> (ø)
...ntry-raven/lib/raven/helpers/deprecation_helper.rb
sentry-raven/lib/raven/instance.rb
...en/spec/raven/integrations/rails/activejob_spec.rb
sentry-raven/spec/raven/integration_spec.rb
sentry-raven/lib/raven/linecache.rb
...c/raven/processors/removecirculareferences_spec.rb
sentry-raven/spec/raven/instance_spec.rb
... and 88 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a47151...f3794a8. Read the comment docs.

@st0012 st0012 merged commit d050286 into master Aug 9, 2021
4.x automation moved this from In progress to Done Aug 9, 2021
@st0012 st0012 deleted the add-severity-to-hint branch August 9, 2021 03:33
@st0012 st0012 modified the milestones: 4.7.0, 4.6.5 Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.x
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants