Update Rust crate sentry to 0.48.0 #31

Merged
redbinder0526 merged 1 commit from renovate/sentry-rust-monorepo into main 2026-04-29 10:25:58 +02:00
Owner

This PR contains the following updates:

Package Type Update Change
sentry (source) dependencies minor 0.38.00.48.0

Release Notes

getsentry/sentry-rust (sentry)

v0.48.0

Compare Source

Breaking Changes
New Features

📊📈💯 The Sentry-Rust SDK now supports emitting Sentry Metrics (#​1073)!

To get started, you will need to add the metrics feature flag when compiling the sentry crate. You will also need to enable metrics when initializing the SDK, like so:

use sentry::ClientOptions;

let _guard = sentry::init((
    "(your DSN here)",
    ClientOptions {
        enable_metrics: true,
        // ... other options ...
        ..Default::default()
    },
));

You can then capture metrics as follows:

use sentry::metrics;
use sentry::types::protocol::latest::Unit;

// We support counter, gauge, and distribution metrics.
metrics::counter("example.counter", 1).capture();
metrics::gauge("connections", 20).capture();
metrics::distribution("response.time", 123.4)
    .unit(Unit::Millisecond) // units can also be set on gauges
    .attribute("http.status", 200) // attributes can be set on all metric types
    .capture();
Fixes
  • Fixed several feature additivity SemVer violations, where enabling a feature flag could have introduced breaking changes. All known violations are fixed now, so simply enabling an additional feature flag in any Sentry SDK crate should no longer cause any public API breakages. Fixing these issues required us to break the public API in some places; those breakages are detailed above.

v0.47.0

Compare Source

Breaking Changes
  • Update reqwest from 0.12.25 to 0.13.1 (#​998). This change is breaking for users who use the RequestHttpTransport::with_client method.
  • sentry_core::HubSwitchGuard is now !Send, preventing it from being moved across threads (#​957).
New Features
Fixes
  • Fixed thread corruption bug where HubSwitchGuard could be dropped on wrong thread (#​957).
  • We now fork the Hub every time a span is entered. This prevents data from leaking across spans (#​957).

v0.46.2

Compare Source

New Features
  • Log HTTP 413 responses as oversized envelope discards in HTTP transports (#​966)
Minimum Supported Rust Version
  • Bump minimum supported Rust version to 1.88 (#​970).

v0.46.1

Compare Source

Improvements
  • Make it possible to == Transaction/Span/TransactionOrSpan (#​942)
Dependencies
  • Update reqwest from 0.12.15 to 0.12.25 (#​951)

v0.46.0

Compare Source

Breaking changes
  • Removed the ClientOptions struct's trim_backtraces and extra_border_frames fields (#​925).
    • These fields configured backtrace trimming, which is being removed in this release.
Improvements
  • Removed backtrace trimming to align the Rust SDK with the general principle that Sentry SDKs should only truncate telemetry data when needed to comply with documented size limits (#​925). This change ensures that as much data as possible remains available for debugging.
    • If you notice any new issues being created for existing errors after this change, please open an issue on GitHub.
Fixes

v0.45.0

Compare Source

Breaking changes
  • Add custom variant to AttachmentType that holds an arbitrary String. (#​916)

v0.44.0

Compare Source

Breaking changes
  • feat(log): support combined LogFilters and RecordMappings (#​914) by @​lcian
    • Breaking change: sentry::integrations::log::LogFilter has been changed to a bitflags struct.
    • It's now possible to map a log record to multiple items in Sentry by combining multiple log filters in the filter, e.g. log::Level::ERROR => LogFilter::Event | LogFilter::Log.
    • If using a custom mapper instead, it's possible to return a Vec<sentry::integrations::log::RecordMapping> to map a log record to multiple items in Sentry.
Behavioral changes
  • ref(log): send logs by default when logs feature flag is enabled (#​915) by @​lcian
    • If the logs feature flag is enabled, the default Sentry log logger now sends logs for all events at or above INFO.
  • ref(logs): enable logs by default if logs feature flag is used (#​910) by @​lcian
    • This changes the default value of sentry::ClientOptions::enable_logs to true.
    • This simplifies the setup of Sentry structured logs by requiring users to just add the log feature flag to the sentry dependency to opt-in to sending logs.
    • When the log feature flag is enabled, the tracing and log integrations will send structured logs to Sentry for all logs/events at or above INFO level by default.

v0.43.0

Compare Source

Breaking changes
  • ref(tracing): rework tracing to Sentry span name/op conversion (#​887) by @​lcian
    • The tracing integration now uses the tracing span name as the Sentry span name by default.
    • Before this change, the span name would be set based on the tracing span target (<module>::<function> when using the tracing::instrument macro).
    • The tracing integration now uses <span target>::<span name> as the default Sentry span op (i.e. <module>::<function> when using tracing::instrument).
    • Before this change, the span op would be set based on the tracing span name.
    • Read below to learn how to customize the span name and op.
    • When upgrading, please ensure to adapt any queries, metrics or dashboards to use the new span names/ops.
  • ref(tracing): use standard code attributes (#​899) by @​lcian
    • Logs now carry the attributes code.module.name, code.file.path and code.line.number standardized in OTEL to surface the respective information, in contrast with the previously sent tracing.module_path, tracing.file and tracing.line.
  • fix(actix): capture only server errors (#​877) by @​lcian
    • The Actix integration now properly honors the capture_server_errors option (enabled by default), capturing errors returned by middleware only if they are server errors (HTTP status code 5xx).
    • Previously, if a middleware were to process the request after the Sentry middleware and return an error, our middleware would always capture it and send it to Sentry, regardless if it was a client, server or some other kind of error.
    • With this change, we capture errors returned by middleware only if those errors can be classified as server errors.
    • There is no change in behavior when it comes to errors returned by services, in which case the Sentry middleware only captures server errors exclusively.
  • fix: send trace origin correctly (#​906) by @​lcian
    • TraceContext now has an additional field origin, used to report which integration created a transaction.
Behavioral changes
  • feat(tracing): send both breadcrumbs and logs by default (#​878) by @​lcian
    • If the logs feature flag is enabled, and enable_logs: true is set on your client options, the default Sentry tracing layer now sends logs for all events at or above INFO.
Features
  • ref(tracing): rework tracing to Sentry span name/op conversion (#​887) by @​lcian

    • Additional special fields have been added that allow overriding certain data on the Sentry span:
      • sentry.op: override the Sentry span op.
      • sentry.name: override the Sentry span name.
      • sentry.trace: given a string matching a valid sentry-trace header (sent automatically by client SDKs), continues the distributed trace instead of starting a new one. If the value is not a valid sentry-trace header or a trace is already started, this value is ignored.
    • sentry.op and sentry.name can also be applied retroactively by declaring fields with value tracing::field::Empty and then recorded using tracing::Span::record.
    • Example usage:
      #[tracing::instrument(skip_all, fields(
          sentry.op = "http.server",
          sentry.name = "GET /payments",
          sentry.trace = headers.get("sentry-trace").unwrap_or(&"".to_owned()),
      ))]
      async fn handle_request(headers: std::collections::HashMap<String, String>) {
          // ...
      }
      
    • Additional attributes are sent along with each span by default:
      • sentry.tracing.target: corresponds to the tracing span's metadata.target()
      • code.module.name, code.file.path, code.line.number
  • feat(core): add Response context (#​874) by @​lcian

    • The Response context can now be attached to events, to include information about HTTP responses such as headers, cookies and status code.
    • Example:
      let mut event = Event::new();
      let response = ResponseContext {
          cookies: Some(r#""csrftoken": "1234567""#.to_owned()),
          headers: Some(headers_map),
          status_code: Some(500),
          body_size: Some(15),
          data: Some("Invalid request"),
      };
      event
          .contexts
          .insert("response".to_owned(), response.into());
      
Fixes
  • build(panic): Fix build without other dependencies (#​883) by @​liskin
    • The sentry-panic crate now builds successfully when used as a standalone dependency.
  • fix(transport): add rate limits for logs (#​894) by @​giortzisg

v0.42.0

Compare Source

Features
  • feat(log): support kv feature of log (#​851) by @​lcian
    • Attributes added to a log record using the kv feature are now recorded as attributes on the log sent to Sentry.
  • feat(types): add all the missing supported envelope headers (#​867) by @​lcian
  • feat(types): add setters for envelope headers (#​868) by @​lcian
    • It's now possible to set all of the envelope headers supported by the protocol when constructing envelopes.
  • feat(core): add some DSC fields to transaction envelope headers (#​869) by @​lcian
    • The SDK now sends additional envelope headers with transactions. This should solve some extrapolation issues for span metrics.
Behavioral changes
  • feat: filter username and password in URLs (#​864) by @​lcian
    • Usernames and passwords that could be contained in URLs captured when using the Actix Web or axum integration are now always filtered out.
    • If the Request is created manually by the user, then these fields are not filtered out.
    • This information was already filtered by Relay, but should also be filtered by the SDK itself as a first line of defense.
Fixes

v0.41.0

Compare Source

Breaking changes
  • feat(tracing): support combined EventFilters and EventMappings (#​847) by @​lcian
    • EventFilter has been changed to a bitflags struct.
    • It's now possible to map a tracing event to multiple items in Sentry by combining multiple event filters in the event_filter, e.g. tracing::Level::ERROR => EventFilter::Event | EventFilter::Log.
    • It's also possible to use EventMapping::Combined to map a tracing event to multiple items in Sentry.
    • ctx in the signatures of event_from_event, breadcrumb_from_event and log_from_event has been changed to take impl Into<Option<&'context Context<'context, S>>> to avoid cloning the Context when mapping to multiple items.
Features
  • feat(core): emit debug log when calling capture_log but logs are disabled (#​849) by @​lcian
Fixes
  • fix(logs): stringify u64 attributes greater than i64::MAX (#​846) by @​lcian
Dependencies

v0.40.0

Compare Source

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 from sentry_core::Scope::apply_to_log.
Features
  • feat(tracing): add support for logs (#​840) by @​lcian
    • To capture tracing events as Sentry structured logs, enable the logs feature of the sentry crate.
    • Then, initialize the SDK with enable_logs: true in 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,
        });
    
  • feat(log): add support for logs (#​841) by @​lcian
    • To capture log records as Sentry structured logs, enable the logs feature of the sentry crate.
    • Then, initialize the SDK with enable_logs: true in 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,
        });
    
  • refactor(logs): cache default attributes and add OS attributes (#​842) by @​lcian
    • os.name and os.version are now being attached to logs as default attributes.
Fixes
  • fix(logs): send environment in sentry.environment default attribute (#​837) by @​lcian
Behavioral changes
  • refactor(tracing): refactor internal code and improve docs (#​839) by @​lcian
    • Errors carried by breadcrumbs will now be stored in the breadcrumb data under their original field name.
    • Before, they were all stored under a single key called errors.
Dependencies

v0.39.0

Compare Source

Features

Support for Sentry structured logs has been added to the SDK.

  • To set up logs, enable the logs feature of the sentry crate and set enable_logs to true in your client options.

  • Then, use the logger_trace!, logger_debug!, logger_info!, logger_warn!, logger_error! and logger_fatal! macros to capture logs.

  • To filter or update logs before they are sent, you can use the before_send_log client option.

  • Please note that breaking changes could occur until the API is finalized.

  • feat(logs): add log protocol types (#​821) by @​lcian

  • feat(logs): add ability to capture and send logs (#​823) by @​lcian & @​Swatinem

  • feat(logs): add macro-based API (#​827) by @​lcian & @​szokeasaurusrex

  • feat(logs): send logs in batches (#​831) by @​lcian

Behavioral changes
  • feat(core): implement Tracing without Performance (#​811) by @​lcian
    • The SDK now implements Tracing without Performance, which makes it so that each Scope is 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_headers has been provided that will use the fallback tracing information if there is no current Span on the Scope.
Breaking changes
  • refactor: remove debug-logs feature (#​820) by @​lcian
    • The deprecated debug-logs feature of the sentry crate, used for the SDK's own internal logging, has been removed.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [sentry](https://sentry.io/welcome/) ([source](https://github.com/getsentry/sentry-rust)) | dependencies | minor | `0.38.0` → `0.48.0` | --- ### Release Notes <details> <summary>getsentry/sentry-rust (sentry)</summary> ### [`v0.48.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0480) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.47.0...0.48.0) ##### Breaking Changes - Added the following metrics-related fields to the [`ClientOptions` struct in `sentry-core`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html). Both fields are no-ops, unless the `metrics` feature flag is enabled: - [`enable_metrics`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.enable_metrics), used to enable sending metrics to Sentry ([#&#8203;1073](https://github.com/getsentry/sentry-rust/pull/1073)). - [`before_send_metric`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.before_send_metric), used to define a callback for filtering/pre-processing metrics before sending to Sentry ([#&#8203;1064](https://github.com/getsentry/sentry-rust/pull/1064)). - There are several breakages related to the [SemVer feature additivity bug fixes](#semver-additivity-bug-fixes-2026-04): - [`sentry_core::ClientOptions`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html) fields [`before_send_log`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.before_send_log), [`enable_logs`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.enable_logs), [`auto_session_tracking`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.auto_session_tracking), and [`session_mode`](https://docs.rs/sentry-core/latest/sentry_core/struct.ClientOptions.html#structfield.session_mode) are no longer gated behind the `logs` and `release-health` feature flags ([#&#8203;1091](https://github.com/getsentry/sentry-rust/pull/1091)). Code that constructs `ClientOptions` with a full struct literal (without `..Default::default()`), or which exhaustively matches against it, must now include all four fields regardless of enabled features. - [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) can no longer be publicly constructed or exhaustively matched against, even when the `client` feature is disabled ([#&#8203;1094](https://github.com/getsentry/sentry-rust/pull/1094)). Previously, both of these were possible when `client` was disabled. - [`sentry_core::Scope::add_event_processor`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#method.add_event_processor) now requires passed closures to be `RefUnwindSafe` ([#&#8203;1093](https://github.com/getsentry/sentry-rust/pull/1093)). Thanks to this change, [`sentry_core::Scope`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html) is now [`UnwindSafe`](https://docs.rs/sentry-core/latest/sentry_core/struct.Scope.html#impl-UnwindSafe-for-Scope) regardless of feature flag configuration; previously, `Scope` was only `UnwindSafe` when the `client` feature was disabled. - [`sentry_tracing::EventMapping`](https://docs.rs/sentry-tracing/latest/sentry_tracing/enum.EventMapping.html) is now `#[non_exhaustive]` ([#&#8203;1097](https://github.com/getsentry/sentry-rust/pull/1097)). - [`sentry_log::RecordMapping`](https://docs.rs/sentry-log/latest/sentry_log/enum.RecordMapping.html) is now `#[non_exhaustive]` ([#&#8203;1098](https://github.com/getsentry/sentry-rust/pull/1098)). ##### New Features 📊📈💯 The Sentry-Rust SDK now supports emitting [Sentry Metrics](https://docs.sentry.io/product/explore/metrics/) ([#&#8203;1073](https://github.com/getsentry/sentry-rust/pull/1073))! To get started, you will need to add the `metrics` feature flag when compiling the `sentry` crate. You will also need to enable metrics when initializing the SDK, like so: ```rust use sentry::ClientOptions; let _guard = sentry::init(( "(your DSN here)", ClientOptions { enable_metrics: true, // ... other options ... ..Default::default() }, )); ``` You can then capture metrics as follows: ```rust use sentry::metrics; use sentry::types::protocol::latest::Unit; // We support counter, gauge, and distribution metrics. metrics::counter("example.counter", 1).capture(); metrics::gauge("connections", 20).capture(); metrics::distribution("response.time", 123.4) .unit(Unit::Millisecond) // units can also be set on gauges .attribute("http.status", 200) // attributes can be set on all metric types .capture(); ``` ##### Fixes - <a name="semver-additivity-bug-fixes-2026-04"></a> Fixed several [feature additivity SemVer violations](https://doc.rust-lang.org/cargo/reference/features.html#semver-compatibility), where enabling a feature flag could have introduced breaking changes. All known violations are fixed now, so simply enabling an additional feature flag in any Sentry SDK crate should no longer cause any public API breakages. Fixing these issues required us to break the public API in some places; those breakages are detailed above. ### [`v0.47.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0470) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.46.2...0.47.0) ##### Breaking Changes - Update reqwest from 0.12.25 to 0.13.1 ([#&#8203;998](https://github.com/getsentry/sentry-rust/pull/998)). This change is breaking for users who use the [`RequestHttpTransport::with_client`](https://docs.rs/sentry/latest/sentry/transports/struct.ReqwestHttpTransport.html#method.with_client) method. - `sentry_core::HubSwitchGuard` is now `!Send`, preventing it from being moved across threads ([#&#8203;957](https://github.com/getsentry/sentry-rust/pull/957)). ##### New Features - Added a `Envelope::into_items` method, which returns an iterator over owned [`EnvelopeItem`s](https://docs.rs/sentry/0.46.2/sentry/protocol/enum.EnvelopeItem.html) in the [`Envelope`](https://docs.rs/sentry/0.46.2/sentry/struct.Envelope.html) ([#&#8203;983](https://github.com/getsentry/sentry-rust/pull/983)). - Expose transport utilities ([#&#8203;949](https://github.com/getsentry/sentry-rust/pull/949)) ##### Fixes - Fixed thread corruption bug where `HubSwitchGuard` could be dropped on wrong thread ([#&#8203;957](https://github.com/getsentry/sentry-rust/pull/957)). - We now fork the `Hub` every time a span is entered. This prevents data from leaking across spans ([#&#8203;957](https://github.com/getsentry/sentry-rust/pull/957)). ### [`v0.46.2`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0462) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.46.1...0.46.2) ##### New Features - Log HTTP 413 responses as oversized envelope discards in HTTP transports ([#&#8203;966](https://github.com/getsentry/sentry-rust/pull/966)) ##### Minimum Supported Rust Version - Bump minimum supported Rust version to 1.88 ([#&#8203;970](https://github.com/getsentry/sentry-rust/pull/970)). ### [`v0.46.1`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0461) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.46.0...0.46.1) ##### Improvements - Make it possible to == Transaction/Span/TransactionOrSpan ([#&#8203;942](https://github.com/getsentry/sentry-rust/pull/942)) ##### Dependencies - Update reqwest from 0.12.15 to 0.12.25 ([#&#8203;951](https://github.com/getsentry/sentry-rust/pull/951)) ### [`v0.46.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0460) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.45.0...0.46.0) ##### Breaking changes - Removed the `ClientOptions` struct's `trim_backtraces` and `extra_border_frames` fields ([#&#8203;925](https://github.com/getsentry/sentry-rust/pull/925)). - These fields configured backtrace trimming, which is being removed in this release. ##### Improvements - Removed backtrace trimming to align the Rust SDK with the general principle that Sentry SDKs should only truncate telemetry data when needed to comply with [documented size limits](https://develop.sentry.dev/sdk/data-model/envelopes/#size-limits) ([#&#8203;925](https://github.com/getsentry/sentry-rust/pull/925)). This change ensures that as much data as possible remains available for debugging. - If you notice any new issues being created for existing errors after this change, please open an issue on [GitHub](https://github.com/getsentry/sentry-rust/issues/new/choose). ##### Fixes - fix: adjust sentry.origin for log integration ([#&#8203;919](https://github.com/getsentry/sentry-rust/pull/919)) by [@&#8203;lcian](https://github.com/lcian) ### [`v0.45.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0450) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.44.0...0.45.0) ##### Breaking changes - Add custom variant to `AttachmentType` that holds an arbitrary String. ([#&#8203;916](https://github.com/getsentry/sentry-rust/pull/916)) ### [`v0.44.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0440) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.43.0...0.44.0) ##### Breaking changes - feat(log): support combined LogFilters and RecordMappings ([#&#8203;914](https://github.com/getsentry/sentry-rust/pull/914)) by [@&#8203;lcian](https://github.com/lcian) - Breaking change: `sentry::integrations::log::LogFilter` has been changed to a `bitflags` struct. - It's now possible to map a `log` record to multiple items in Sentry by combining multiple log filters in the filter, e.g. `log::Level::ERROR => LogFilter::Event | LogFilter::Log`. - If using a custom `mapper` instead, it's possible to return a `Vec<sentry::integrations::log::RecordMapping>` to map a `log` record to multiple items in Sentry. ##### Behavioral changes - ref(log): send logs by default when logs feature flag is enabled ([#&#8203;915](https://github.com/getsentry/sentry-rust/pull/915)) by [@&#8203;lcian](https://github.com/lcian) - If the `logs` feature flag is enabled, the default Sentry `log` logger now sends logs for all events at or above INFO. - ref(logs): enable logs by default if logs feature flag is used ([#&#8203;910](https://github.com/getsentry/sentry-rust/pull/910)) by [@&#8203;lcian](https://github.com/lcian) - This changes the default value of `sentry::ClientOptions::enable_logs` to `true`. - This simplifies the setup of Sentry structured logs by requiring users to just add the `log` feature flag to the `sentry` dependency to opt-in to sending logs. - When the `log` feature flag is enabled, the `tracing` and `log` integrations will send structured logs to Sentry for all logs/events at or above INFO level by default. ### [`v0.43.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0430) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.42.0...0.43.0) ##### Breaking changes - ref(tracing): rework tracing to Sentry span name/op conversion ([#&#8203;887](https://github.com/getsentry/sentry-rust/pull/887)) by [@&#8203;lcian](https://github.com/lcian) - The `tracing` integration now uses the tracing span name as the Sentry span name by default. - Before this change, the span name would be set based on the `tracing` span target (`<module>::<function>` when using the `tracing::instrument` macro). - The `tracing` integration now uses `<span target>::<span name>` as the default Sentry span op (i.e. `<module>::<function>` when using `tracing::instrument`). - Before this change, the span op would be set based on the `tracing` span name. - Read below to learn how to customize the span name and op. - When upgrading, please ensure to adapt any queries, metrics or dashboards to use the new span names/ops. - ref(tracing): use standard code attributes ([#&#8203;899](https://github.com/getsentry/sentry-rust/pull/899)) by [@&#8203;lcian](https://github.com/lcian) - Logs now carry the attributes `code.module.name`, `code.file.path` and `code.line.number` standardized in OTEL to surface the respective information, in contrast with the previously sent `tracing.module_path`, `tracing.file` and `tracing.line`. - fix(actix): capture only server errors ([#&#8203;877](https://github.com/getsentry/sentry-rust/pull/877)) by [@&#8203;lcian](https://github.com/lcian) - The Actix integration now properly honors the `capture_server_errors` option (enabled by default), capturing errors returned by middleware only if they are server errors (HTTP status code 5xx). - Previously, if a middleware were to process the request after the Sentry middleware and return an error, our middleware would always capture it and send it to Sentry, regardless if it was a client, server or some other kind of error. - With this change, we capture errors returned by middleware only if those errors can be classified as server errors. - There is no change in behavior when it comes to errors returned by services, in which case the Sentry middleware only captures server errors exclusively. - fix: send trace origin correctly ([#&#8203;906](https://github.com/getsentry/sentry-rust/pull/906)) by [@&#8203;lcian](https://github.com/lcian) - `TraceContext` now has an additional field `origin`, used to report which integration created a transaction. ##### Behavioral changes - feat(tracing): send both breadcrumbs and logs by default ([#&#8203;878](https://github.com/getsentry/sentry-rust/pull/878)) by [@&#8203;lcian](https://github.com/lcian) - If the `logs` feature flag is enabled, and `enable_logs: true` is set on your client options, the default Sentry `tracing` layer now sends logs for all events at or above INFO. ##### Features - ref(tracing): rework tracing to Sentry span name/op conversion ([#&#8203;887](https://github.com/getsentry/sentry-rust/pull/887)) by [@&#8203;lcian](https://github.com/lcian) - Additional special fields have been added that allow overriding certain data on the Sentry span: - `sentry.op`: override the Sentry span op. - `sentry.name`: override the Sentry span name. - `sentry.trace`: given a string matching a valid `sentry-trace` header (sent automatically by client SDKs), continues the distributed trace instead of starting a new one. If the value is not a valid `sentry-trace` header or a trace is already started, this value is ignored. - `sentry.op` and `sentry.name` can also be applied retroactively by declaring fields with value `tracing::field::Empty` and then recorded using `tracing::Span::record`. - Example usage: ```rust #[tracing::instrument(skip_all, fields( sentry.op = "http.server", sentry.name = "GET /payments", sentry.trace = headers.get("sentry-trace").unwrap_or(&"".to_owned()), ))] async fn handle_request(headers: std::collections::HashMap<String, String>) { // ... } ``` - Additional attributes are sent along with each span by default: - `sentry.tracing.target`: corresponds to the `tracing` span's `metadata.target()` - `code.module.name`, `code.file.path`, `code.line.number` - feat(core): add Response context ([#&#8203;874](https://github.com/getsentry/sentry-rust/pull/874)) by [@&#8203;lcian](https://github.com/lcian) - The `Response` context can now be attached to events, to include information about HTTP responses such as headers, cookies and status code. - Example: ```rust let mut event = Event::new(); let response = ResponseContext { cookies: Some(r#""csrftoken": "1234567""#.to_owned()), headers: Some(headers_map), status_code: Some(500), body_size: Some(15), data: Some("Invalid request"), }; event .contexts .insert("response".to_owned(), response.into()); ``` ##### Fixes - build(panic): Fix build without other dependencies ([#&#8203;883](https://github.com/getsentry/sentry-rust/pull/883)) by [@&#8203;liskin](https://github.com/liskin) - The `sentry-panic` crate now builds successfully when used as a standalone dependency. - fix(transport): add rate limits for logs ([#&#8203;894](https://github.com/getsentry/sentry-rust/pull/894)) by [@&#8203;giortzisg](https://github.com/giortzisg) ### [`v0.42.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0420) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.41.0...0.42.0) ##### Features - feat(log): support kv feature of log ([#&#8203;851](https://github.com/getsentry/sentry-rust/issues/851)) by [@&#8203;lcian](https://github.com/lcian) - Attributes added to a `log` record using the `kv` feature are now recorded as attributes on the log sent to Sentry. - feat(types): add all the missing supported envelope headers ([#&#8203;867](https://github.com/getsentry/sentry-rust/pull/867)) by [@&#8203;lcian](https://github.com/lcian) - feat(types): add setters for envelope headers ([#&#8203;868](https://github.com/getsentry/sentry-rust/pull/868)) by [@&#8203;lcian](https://github.com/lcian) - It's now possible to set all of the [envelope headers](https://develop.sentry.dev/sdk/data-model/envelopes/#headers) supported by the protocol when constructing envelopes. - feat(core): add some DSC fields to transaction envelope headers ([#&#8203;869](https://github.com/getsentry/sentry-rust/pull/869)) by [@&#8203;lcian](https://github.com/lcian) - The SDK now sends additional envelope headers with transactions. This should solve some extrapolation issues for span metrics. ##### Behavioral changes - feat: filter username and password in URLs ([#&#8203;864](https://github.com/getsentry/sentry-rust/pull/864)) by [@&#8203;lcian](https://github.com/lcian) - Usernames and passwords that could be contained in URLs captured when using the Actix Web or axum integration are now always filtered out. - If the `Request` is created manually by the user, then these fields are not filtered out. - This information was already filtered by Relay, but should also be filtered by the SDK itself as a first line of defense. ##### Fixes - docs: match description of `debug` option with behavior since PR [#&#8203;820](https://github.com/getsentry/sentry-rust/issues/820) ([#&#8203;860](https://github.com/getsentry/sentry-rust/pull/860)) by [@&#8203;AlexTMjugador](https://github.com/AlexTMjugador) ### [`v0.41.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0410) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.40.0...0.41.0) ##### Breaking changes - feat(tracing): support combined EventFilters and EventMappings ([#&#8203;847](https://github.com/getsentry/sentry-rust/issues/847)) by [@&#8203;lcian](https://github.com/lcian) - `EventFilter` has been changed to a `bitflags` struct. - It's now possible to map a `tracing` event to multiple items in Sentry by combining multiple event filters in the `event_filter`, e.g. `tracing::Level::ERROR => EventFilter::Event | EventFilter::Log`. - It's also possible to use `EventMapping::Combined` to map a `tracing` event to multiple items in Sentry. - `ctx` in the signatures of `event_from_event`, `breadcrumb_from_event` and `log_from_event` has been changed to take `impl Into<Option<&'context Context<'context, S>>>` to avoid cloning the `Context` when mapping to multiple items. ##### Features - feat(core): emit debug log when calling capture\_log but logs are disabled ([#&#8203;849](https://github.com/getsentry/sentry-rust/issues/849)) by [@&#8203;lcian](https://github.com/lcian) ##### Fixes - fix(logs): stringify u64 attributes greater than `i64::MAX` ([#&#8203;846](https://github.com/getsentry/sentry-rust/issues/846)) by [@&#8203;lcian](https://github.com/lcian) ##### Dependencies - chore(deps): bump `anyhow` and disable its `backtrace` feature ([#&#8203;632](https://github.com/getsentry/sentry-rust/issues/632)) by [@&#8203;LunaBorowska](https://github.com/LunaBorowska) ### [`v0.40.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0400) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.39.0...0.40.0) ##### Breaking changes - refactor(logs): apply user attributes to log regardless of `send_default_pii` ([#&#8203;843](https://github.com/getsentry/sentry-rust/issues/843)) by [@&#8203;lcian](https://github.com/lcian) - User attributes should be applied to logs regardless of `send_default_pii`. Therefore, that parameter was removed from `sentry_core::Scope::apply_to_log`. ##### Features - feat(tracing): add support for logs ([#&#8203;840](https://github.com/getsentry/sentry-rust/issues/840)) by [@&#8203;lcian](https://github.com/lcian) - To capture `tracing` events as Sentry structured logs, enable the `logs` feature of the `sentry` crate. - Then, initialize the SDK with `enable_logs: true` in your client options. - Finally, set up a custom event filter to map events to logs based on criteria such as severity. For example: ```rust let sentry_layer = sentry_tracing::layer().event_filter(|md| match *md.level() { tracing::Level::ERROR => EventFilter::Event, tracing::Level::TRACE => EventFilter::Ignore, _ => EventFilter::Log, }); ``` - feat(log): add support for logs ([#&#8203;841](https://github.com/getsentry/sentry-rust/issues/841)) by [@&#8203;lcian](https://github.com/lcian) - To capture `log` records as Sentry structured logs, enable the `logs` feature of the `sentry` crate. - Then, initialize the SDK with `enable_logs: true` in your client options. - Finally, set up a custom event filter to map records to Sentry logs based on criteria such as severity. For example: ```rust let logger = sentry::integrations::log::SentryLogger::new().filter(|md| match md.level() { log::Level::Error => LogFilter::Event, log::Level::Trace => LogFilter::Ignore, _ => LogFilter::Log, }); ``` - refactor(logs): cache default attributes and add OS attributes ([#&#8203;842](https://github.com/getsentry/sentry-rust/issues/842)) by [@&#8203;lcian](https://github.com/lcian) - `os.name` and `os.version` are now being attached to logs as default attributes. ##### Fixes - fix(logs): send environment in `sentry.environment` default attribute ([#&#8203;837](https://github.com/getsentry/sentry-rust/issues/837)) by [@&#8203;lcian](https://github.com/lcian) ##### Behavioral changes - refactor(tracing): refactor internal code and improve docs ([#&#8203;839](https://github.com/getsentry/sentry-rust/issues/839)) by [@&#8203;lcian](https://github.com/lcian) - Errors carried by breadcrumbs will now be stored in the breadcrumb `data` under their original field name. - Before, they were all stored under a single key called `errors`. ##### Dependencies - chore(deps): upgrade `ureq` to 3.x ([#&#8203;835](https://github.com/getsentry/sentry-rust/issues/835)) by [@&#8203;algesten](https://github.com/algesten) ### [`v0.39.0`](https://github.com/getsentry/sentry-rust/blob/HEAD/CHANGELOG.md#0390) [Compare Source](https://github.com/getsentry/sentry-rust/compare/0.38.1...0.39.0) ##### Features Support for [Sentry structured logs](https://docs.sentry.io/product/explore/logs/) has been added to the SDK. - To set up logs, enable the `logs` feature of the `sentry` crate and set `enable_logs` to `true` in your client options. - Then, use the `logger_trace!`, `logger_debug!`, `logger_info!`, `logger_warn!`, `logger_error!` and `logger_fatal!` macros to capture logs. - To filter or update logs before they are sent, you can use the `before_send_log` client option. - Please note that breaking changes could occur until the API is finalized. - feat(logs): add log protocol types ([#&#8203;821](https://github.com/getsentry/sentry-rust/issues/821)) by [@&#8203;lcian](https://github.com/lcian) - feat(logs): add ability to capture and send logs ([#&#8203;823](https://github.com/getsentry/sentry-rust/issues/823)) by [@&#8203;lcian](https://github.com/lcian) & [@&#8203;Swatinem](https://github.com/Swatinem) - feat(logs): add macro-based API ([#&#8203;827](https://github.com/getsentry/sentry-rust/issues/827)) by [@&#8203;lcian](https://github.com/lcian) & [@&#8203;szokeasaurusrex](https://github.com/szokeasaurusrex) - feat(logs): send logs in batches ([#&#8203;831](https://github.com/getsentry/sentry-rust/issues/831)) by [@&#8203;lcian](https://github.com/lcian) ##### Behavioral changes - feat(core): implement Tracing without Performance ([#&#8203;811](https://github.com/getsentry/sentry-rust/issues/811)) by [@&#8203;lcian](https://github.com/lcian) - The SDK now implements Tracing without Performance, which makes it so that each `Scope` is 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_headers` has been provided that will use the fallback tracing information if there is no current `Span` on the `Scope`. ##### Breaking changes - refactor: remove `debug-logs` feature ([#&#8203;820](https://github.com/getsentry/sentry-rust/issues/820)) by [@&#8203;lcian](https://github.com/lcian) - The deprecated `debug-logs` feature of the `sentry` crate, used for the SDK's own internal logging, has been removed. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNTAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE1MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Update Rust crate sentry to 0.48.0
All checks were successful
Build and Test / account (push) Successful in 6m14s
2f8fcad3db
spacebot force-pushed renovate/sentry-rust-monorepo from 2f8fcad3db
All checks were successful
Build and Test / account (push) Successful in 6m14s
to 53f5ed9c52
All checks were successful
Build and Test / account (push) Successful in 7m4s
2026-04-29 10:00:59 +02:00
Compare
redbinder0526 deleted branch renovate/sentry-rust-monorepo 2026-04-29 10:25:58 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
spacebar/account!31
No description provided.