Skip to content

Unify breadcrumb loggers activation#1016

Merged
st0012 merged 4 commits intomasterfrom
impl-#665
Sep 10, 2020
Merged

Unify breadcrumb loggers activation#1016
st0012 merged 4 commits intomasterfrom
impl-#665

Conversation

@st0012
Copy link
Copy Markdown
Contributor

@st0012 st0012 commented Sep 10, 2020

This will replace the way we activate our breadcrumbs loggers.
Currently, we have SentryLogger and ActiveSupportLogger for
logging breadcrumbs. And they need to be activated differently:

require "raven/breadcrumbs/sentry_logger"
Raven.configuration.rails_activesupport_breadcrumbs = true

It's not a nice user interface, so this PR adds a new configuration
option breadcrumbs_logger to improve this:

Raven.configuration.breadcrumbs_logger = :sentry_logger
Raven.configuration.breadcrumbs_logger = :active_support_logger
Raven.configuration.breadcrumbs_logger = [:sentry_logger, :active_support_logger]

However, the old activation ways will still be supported until version 4.0 with deprecation warnings.

Closes #665

This will replace the way we activate our breadcrumbs loggers.
Currently, we have `SentryLogger` and `ActiveSupportLogger` for
logging breadcrumbs. And they need to be activated differently:

```ruby
require "raven/breadcrumbs/sentry_logger"
Raven.configuration.rails_activesupport_breadcrumbs = true
```

It's not a nice user interface, so this commit adds a new configuration
options "breadcrumbs_logger" to solve this:

```ruby
Raven.configuration.breadcrumbs_logger = :sentry_logger
Raven.configuration.breadcrumbs_logger = :active_support_logger
Raven.configuration.breadcrumbs_logger = [:sentry_logger, :active_support_logger]
```
@st0012 st0012 added this to the 3.1.0 milestone Sep 10, 2020
@st0012 st0012 self-assigned this Sep 10, 2020
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 10, 2020

Codecov Report

Merging #1016 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1016   +/-   ##
=======================================
  Coverage   97.85%   97.85%           
=======================================
  Files          54       53    -1     
  Lines        2377     2379    +2     
=======================================
+ Hits         2326     2328    +2     
  Misses         51       51           
Impacted Files Coverage Δ
lib/raven/cli.rb 86.20% <100.00%> (ø)
lib/raven/integrations/rails.rb 90.90% <100.00%> (+0.21%) ⬆️
...ven/breadcrumbs/active_support_breadcrumbs_spec.rb 100.00% <100.00%> (ø)
spec/raven/breadcrumbs/sentry_logger_spec.rb 100.00% <100.00%> (ø)
spec/raven/configuration_spec.rb 98.69% <100.00%> (+0.01%) ⬆️

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 83e683a...d1b29e6. Read the comment docs.

@st0012 st0012 merged commit f3edc6e into master Sep 10, 2020
@st0012 st0012 deleted the impl-#665 branch September 10, 2020 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add configuration for logger breadcrumbs

2 participants