Skip to content

Releases: getsentry/sentry-rust

0.48.3

25 Jun 07:38

Choose a tag to compare

The Sentry Rust SDK now reports data discarded by the SDK to Sentry’s Stats page. The SDK reports approximate counts for drops from transports, queues, rate-limit backoff, sampling, event processors, and before_send* callbacks, including span counts for dropped transactions and byte counts for dropped logs and metrics.

New Features

Deprecations

Fixes

  • Fixed ureq transport handling for HTTP error statuses so 429 rate limits and 413 payload-too-large responses are processed correctly (#1177).

Behavior Changes

  • Custom transport factories that implement TransportFactory::create_transport now receive ClientOptions reconstructed from TransportOptions. The reconstructed options include only transport-relevant fields, such as DSN, user agent, proxy settings, and TLS certificate validation settings. This may affect code that reads non-transport fields in create_transport, but the API remains source-compatible and this change is included in a minor/patch release (#1142).

0.48.2

11 May 09:10
8d8e8fc

Choose a tag to compare

New Features

  • Added rustls-no-provider feature flag in the sentry crate to allow using the rustls transport with a different crypto provider (#1103).

Fixes

  • Serialize attachment envelope headers as JSON to correctly encode header values (#1109).
  • Use checked arithmetic to handle possible overflows (#1119, #1121, #1122).

0.48.1

04 May 11:51

Choose a tag to compare

Fixes

  • Changed ClientOptions::enable_metrics to default to true, aligning metrics behavior with other Sentry SDKs (#1106). Metric capture APIs still require the metrics feature flag at compile time.

0.48.0

28 Apr 15:45

Choose a tag to compare

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.

0.47.0

10 Mar 14:40

Choose a tag to compare

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

  • Added a Envelope::into_items method, which returns an iterator over owned EnvelopeItems in the Envelope (#983).
  • Expose transport utilities (#949)

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).

0.46.2

04 Feb 12:19

Choose a tag to compare

New Features

  • Log HTTP 413 responses as oversized envelope discards in HTTP transports (#966)

0.46.1

07 Jan 08:38

Choose a tag to compare

Improvements

  • Make it possible to == Transaction/Span/TransactionOrSpan (#942)

Dependencies

  • Update reqwest from 0.12.15 to 0.12.25 (#951)

0.46.0

24 Nov 13:36

Choose a tag to compare

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

  • fix: adjust sentry.origin for log integration (#919) by @lcian

0.45.0

08 Oct 09:19

Choose a tag to compare

Breaking changes

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

0.44.0

07 Oct 10:00

Choose a tag to compare

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.