Skip to content

ref: Rearchitect the log and slog Integrations #268

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

Merged
merged 8 commits into from
Oct 16, 2020
Merged

Conversation

Swatinem
Copy link
Member

In hindsight, putting all the filters/mappers on the Hub/Client-bound Integration was a mistake, and all that should be inside a lightweight logger.

@Swatinem Swatinem requested a review from a team September 25, 2020 11:22
@Swatinem Swatinem marked this pull request as ready for review September 25, 2020 11:22
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two general points:

  1. As opposed to before, the user now has to call log::set_max_level_filter manually. We need to clearly document that in the migration notes (Changelog), as otherwise suddenly logs will just be suppressed.

  2. What's now not really possible is to create breadcrumbs with a higher level than the inner max level. Following example: We may want breadcrumbs on TRACE level, but only log INFO to stderr. Do you think that is something we may be able to achieve? My initial hunch says this is too much of an edge case and can be solved in the log stash, too.

@@ -41,6 +41,7 @@
#![doc(html_favicon_url = "https://sentry-brand.storage.googleapis.com/favicon.ico")]
#![doc(html_logo_url = "https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png")]
#![warn(missing_docs)]
#![allow(clippy::match_like_matches_macro)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of allowing this, can we just fix this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not unless we break the MSRV, since matches! is a 1.42 feature.

@Swatinem Swatinem merged commit 194ba1c into master Oct 16, 2020
@Swatinem Swatinem deleted the ref/loggers branch October 16, 2020 10:22
jan-auer added a commit that referenced this pull request Nov 25, 2020
* master: (59 commits)
  fix: Correctly apply environment from env (#293)
  fix: Make Rust 1.48 clippy happy (#294)
  docs: Document integrations and the Hub better (#291)
  ref: Remove deprecated error-chain and failure crates (#290)
  release: 0.21.0
  meta: Update Changelog
  feat: End sessions with explicit status (#289)
  fix: Scope transaction name can be overriden in sentry-actix (#287)
  fix: sentry-actix should not capture client errors (#286)
  fix: Clean up sentry-actix toml (#285)
  ref: Remove empty integrations (#283)
  feat: Add support for actix-web 3 (#282)
  feat: Preliminary work to integrate Performance Monitoring (#276)
  ref: Introduce a SessionFlusher (#279)
  fix: Set a default environment based on debug_assertions (#280)
  ref: Rearchitect the log and slog Integrations (#268)
  ref: Deprecate public fields on Integrations (#267)
  ci: Make testfast actually fast (#273)
  fix: Update surf and unbreak CI (#274)
  ci: Use smarter cache action (#272)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants