H-4824: Update sentry-rust monorepo to v0.40.0
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| sentry (source) | workspace.dependencies | minor | =0.37.0 -> =0.40.0 |
| sentry-types (source) | workspace.dependencies | minor | =0.37.0 -> =0.40.0 |
[!WARNING] Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
getsentry/sentry-rust (sentry)
v0.40.0
Breaking changes
- refactor(logs): apply user attributes to log regardless of
send_default_pii(#​843) by @​lcian- User attributes should be applied to logs regardless of
send_default_pii. Therefore, that parameter was removed fromsentry_core::Scope::apply_to_log.
- User attributes should be applied to logs regardless of
Features
- feat(tracing): add support for logs (#​840) by @​lcian
- To capture
tracingevents as Sentry structured logs, enable thelogsfeature of thesentrycrate. - Then, initialize the SDK with
enable_logs: truein your client options. - Finally, set up a custom event filter to map events to logs based on criteria such as severity. For example:
let sentry_layer = sentry_tracing::layer().event_filter(|md| match *md.level() { tracing::Level::ERROR => EventFilter::Event, tracing::Level::TRACE => EventFilter::Ignore, _ => EventFilter::Log, }); - To capture
- feat(log): add support for logs (#​841) by @​lcian
- To capture
logrecords as Sentry structured logs, enable thelogsfeature of thesentrycrate. - Then, initialize the SDK with
enable_logs: truein your client options. - Finally, set up a custom event filter to map records to Sentry logs based on criteria such as severity. For example:
let logger = sentry::integrations::log::SentryLogger::new().filter(|md| match md.level() { log::Level::Error => LogFilter::Event, log::Level::Trace => LogFilter::Ignore, _ => LogFilter::Log, }); - To capture
- refactor(logs): cache default attributes and add OS attributes (#​842) by @​lcian
-
os.nameandos.versionare now being attached to logs as default attributes.
-
Fixes
Behavioral changes
- refactor(tracing): refactor internal code and improve docs (#​839) by @​lcian
- Errors carried by breadcrumbs will now be stored in the breadcrumb
dataunder their original field name. - Before, they were all stored under a single key called
errors.
- Errors carried by breadcrumbs will now be stored in the breadcrumb
Dependencies
- chore(deps): upgrade
ureqto 3.x (#​835) by @​algesten
v0.39.0
Features
Support for Sentry structured logs has been added to the SDK.
-
To set up logs, enable the
logsfeature of thesentrycrate and setenable_logstotruein your client options. -
Then, use the
logger_trace!,logger_debug!,logger_info!,logger_warn!,logger_error!andlogger_fatal!macros to capture logs. -
To filter or update logs before they are sent, you can use the
before_send_logclient option. -
Please note that breaking changes could occur until the API is finalized.
-
feat(logs): add ability to capture and send logs (#​823) by @​lcian & @​Swatinem
-
feat(logs): add macro-based API (#​827) by @​lcian & @​szokeasaurusrex
Behavioral changes
- feat(core): implement Tracing without Performance (#​811) by @​lcian
- The SDK now implements Tracing without Performance, which makes it so that each
Scopeis associated with an object holding some tracing information. - This information is used as a fallback when capturing an event with tracing disabled or otherwise no ongoing span, to still allow related events to be linked by a trace.
- A new API
Scope::iter_trace_propagation_headershas been provided that will use the fallback tracing information if there is no currentSpanon theScope.
- The SDK now implements Tracing without Performance, which makes it so that each
Breaking changes
- refactor: remove
debug-logsfeature (#​820) by @​lcian- The deprecated
debug-logsfeature of thesentrycrate, used for the SDK's own internal logging, has been removed.
- The deprecated
v0.38.1
Fixes
- build: include
sentry-actixoptionally whenrelease-healthis enabled (#​806) by @​lcian-
sentry-actixis now being included as a dependency only when explicitly added, either as a direct dependency or through theactixfeature flag of thesentrycrate. - Due to a mistake in the
Cargo.toml, it was previously being included as a dependency by default when using just thesentrycrate with default features.
-
v0.38.0
OpenTelemetry integration
An OpenTelemetry integration has been released. Please refer to the changelog entry below for the details.
Breaking changes
- refactor(tracing): remove
EventFilter::exceptionand always attach exception (#​768) by @​lcian- The
EventFilter::Exceptionenum variant has been removed. Please useEventFilter::Eventinstead to achieve the same behavior. - Using
EventFilter::Eventwill always attach any error struct used within theerrorfield passed to thetracingmacro, asEventFilter::Exceptiondid previously. - The
errorfield will also be attached to breadcrumbs as anerrorsfield resembling the structure of Sentry events created from error structs.
- The
- fix: use
release-healthflag insentry-actixand remove it from subcrates where unneeded (#​787) by @​lcian- As a follow-up from the changes in the previous release, the
ClientOptionsfieldsauto_session_trackingandsession_modeare now gated behind therelease-healthfeature flag of thesentrycrate. - If you depend on
sentrywithdefault-features = false, you need to include therelease-healthfeature flag to benefit from the Release Health features of Sentry and have access to the aforementioned client options. - The
release-healthfeature flag is used correctly insentry-actixto enable compilation of that subcrate when it's disabled. - The
release-healthhas been removed from thesentry-tracingandsentry-towersubcrates, where it was unnecessary.
- As a follow-up from the changes in the previous release, the
- refactor: remove Surf transport (#​766) by @​lcian
- The Surf transport has been removed as the
surfcrate is unmaintained and it was holding back dependency upgrades. - If you really want to still use Surf, you can define a custom
TransportFactoryand pass it as thetransportin yourClientOptions
- The Surf transport has been removed as the
Behavioral changes
- refactor: honor
send_default_piiinsentry-actixandsentry-tower(#​771) by @​lcian- The client option
send_default_pii(disabled by default) is now honored bysentry-actixandsentry-tower. - This means that potentially sensitive headers such as authorization, cookies, and those that usually contain the user's IP address are filtered and not sent to Sentry.
- If you want to get back to the previous behavior and capture all headers, please set
send_default_piitotruein yourClientOptions. - Please refer to our Data Collected page for a comprehensive view of the data collected by the SDK.
- The client option
- refactor(debug-images): force init
DEBUG_METAon integration init (#​773) by @​lcian- The
DebugImagesintegration has been updated to init theDEBUG_METALazyimmediately. - Using this integration is known to cause issues in specific versions of the Linux kernel due to issues in a library it depends on.
- Previously, on problematic systems the SDK would cause deadlock after capturing the first event. Now the SDK will panic on initialization instead. Please open an issue if you're affected.
- The
Features
- feat(otel): add OpenTelemetry SpanProcessor, Propagator, Extractor (#​779) by @​lcian
- A new integration for the
opentelemetrycrate has been released. - It can be used to capture spans created using the
opentelemetryAPI and send them to Sentry. - Distributed tracing is also supported, provided that the upstream/downstream services support the Sentry or W3C distributed tracing metadata format.
- Please refer to the subcrate's README or the crate docs to see an example of setup and usage.
- A new integration for the
- feat: expose
sentry-actixas a feature ofsentry(#​788) by @​lcian-
sentry-actixis now exposed by thesentrycrate assentry::integrations::actix, gated behind theactixfeature flag. - Please update your dependencies to not depend on the
sentry-actixsubcrate directly.
-
Dependencies
- build(deps): bump openssl from 0.10.71 to 0.10.72 (#​762) by @​dependabot
- build(deps): bump tokio from 1.44.1 to 1.44.2 (#​763) by @​dependabot
- chore(deps): bump some dependencies and update
Cargo.lock(#​772) by @​lcian
Various fixes & improvements
- Replace
once_cellwithstd::sync::LazyLock(#​776) by @​FalkWoldmann - chore: update GH issue templates for Linear compatibility (#​777) by @​stephanie-anderson
- chore: update issue templates with blank issue and Discord link (#​778) by @​lcian
- refactor(core): fail with message if TLS backend not available (#​784) by @​lcian
- build: add
sentry-opentelemetryto workspace (#​789) by @​lcian - docs: update docs including OTEL and other integrations (#​790) by @​lcian
- fix(otel): fix doctests (#​794) by @​lcian
- fix(otel): fix span and trace ids for distributed tracing (#​801) by @​lcian
- build(otel): exclude version from circular dev-dependencies (#​802) by @​lcian
Configuration
📅 Schedule: Branch creation - "before 4am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Renovate Bot.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 53.30%. Comparing base (
decf570) to head (bc81d41). Report is 36 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7126 +/- ##
==========================================
- Coverage 53.32% 53.30% -0.03%
==========================================
Files 1081 1081
Lines 93826 93873 +47
Branches 4433 4433
==========================================
- Hits 50037 50035 -2
- Misses 42842 42892 +50
+ Partials 947 946 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Once https://github.com/hashintel/hash/pull/7452 merges (or alongside), do we want to take a look at this again @TimDiekmann so it's also up-to-date?
Yes, I will take a look at this. I would do it as a follow-up of #7452 as, except they communicate with sentry, there should be no connection between the PRs.
I created H-4824 to track this.
Superseded by #7480