Update Rust crate sentry to 0.48.0 #31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/sentry-rust-monorepo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.38.0→0.48.0Release Notes
getsentry/sentry-rust (sentry)
v0.48.0Compare Source
Breaking Changes
ClientOptionsstruct insentry-core. Both fields are no-ops, unless themetricsfeature flag is enabled:enable_metrics, used to enable sending metrics to Sentry (#1073).before_send_metric, used to define a callback for filtering/pre-processing metrics before sending to Sentry (#1064).sentry_core::ClientOptionsfieldsbefore_send_log,enable_logs,auto_session_tracking, andsession_modeare no longer gated behind thelogsandrelease-healthfeature flags (#1091). Code that constructsClientOptionswith 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::Scopecan no longer be publicly constructed or exhaustively matched against, even when theclientfeature is disabled (#1094). Previously, both of these were possible whenclientwas disabled.sentry_core::Scope::add_event_processornow requires passed closures to beRefUnwindSafe(#1093). Thanks to this change,sentry_core::Scopeis nowUnwindSaferegardless of feature flag configuration; previously,Scopewas onlyUnwindSafewhen theclientfeature was disabled.sentry_tracing::EventMappingis now#[non_exhaustive](#1097).sentry_log::RecordMappingis now#[non_exhaustive](#1098).New Features
📊📈💯 The Sentry-Rust SDK now supports emitting Sentry Metrics (#1073)!
To get started, you will need to add the
metricsfeature flag when compiling thesentrycrate. You will also need to enable metrics when initializing the SDK, like so:You can then capture metrics as follows:
Fixes
v0.47.0Compare Source
Breaking Changes
RequestHttpTransport::with_clientmethod.sentry_core::HubSwitchGuardis now!Send, preventing it from being moved across threads (#957).New Features
Envelope::into_itemsmethod, which returns an iterator over ownedEnvelopeItems in theEnvelope(#983).Fixes
HubSwitchGuardcould be dropped on wrong thread (#957).Hubevery time a span is entered. This prevents data from leaking across spans (#957).v0.46.2Compare Source
New Features
Minimum Supported Rust Version
v0.46.1Compare Source
Improvements
Dependencies
v0.46.0Compare Source
Breaking changes
ClientOptionsstruct'strim_backtracesandextra_border_framesfields (#925).Improvements
Fixes
v0.45.0Compare Source
Breaking changes
AttachmentTypethat holds an arbitrary String. (#916)v0.44.0Compare Source
Breaking changes
sentry::integrations::log::LogFilterhas been changed to abitflagsstruct.logrecord to multiple items in Sentry by combining multiple log filters in the filter, e.g.log::Level::ERROR => LogFilter::Event | LogFilter::Log.mapperinstead, it's possible to return aVec<sentry::integrations::log::RecordMapping>to map alogrecord to multiple items in Sentry.Behavioral changes
logsfeature flag is enabled, the default Sentryloglogger now sends logs for all events at or above INFO.sentry::ClientOptions::enable_logstotrue.logfeature flag to thesentrydependency to opt-in to sending logs.logfeature flag is enabled, thetracingandlogintegrations will send structured logs to Sentry for all logs/events at or above INFO level by default.v0.43.0Compare Source
Breaking changes
tracingintegration now uses the tracing span name as the Sentry span name by default.tracingspan target (<module>::<function>when using thetracing::instrumentmacro).tracingintegration now uses<span target>::<span name>as the default Sentry span op (i.e.<module>::<function>when usingtracing::instrument).tracingspan name.code.module.name,code.file.pathandcode.line.numberstandardized in OTEL to surface the respective information, in contrast with the previously senttracing.module_path,tracing.fileandtracing.line.capture_server_errorsoption (enabled by default), capturing errors returned by middleware only if they are server errors (HTTP status code 5xx).TraceContextnow has an additional fieldorigin, used to report which integration created a transaction.Behavioral changes
logsfeature flag is enabled, andenable_logs: trueis set on your client options, the default Sentrytracinglayer now sends logs for all events at or above INFO.Features
ref(tracing): rework tracing to Sentry span name/op conversion (#887) by @lcian
sentry.op: override the Sentry span op.sentry.name: override the Sentry span name.sentry.trace: given a string matching a validsentry-traceheader (sent automatically by client SDKs), continues the distributed trace instead of starting a new one. If the value is not a validsentry-traceheader or a trace is already started, this value is ignored.sentry.opandsentry.namecan also be applied retroactively by declaring fields with valuetracing::field::Emptyand then recorded usingtracing::Span::record.sentry.tracing.target: corresponds to thetracingspan'smetadata.target()code.module.name,code.file.path,code.line.numberfeat(core): add Response context (#874) by @lcian
Responsecontext can now be attached to events, to include information about HTTP responses such as headers, cookies and status code.Fixes
sentry-paniccrate now builds successfully when used as a standalone dependency.v0.42.0Compare Source
Features
logrecord using thekvfeature are now recorded as attributes on the log sent to Sentry.Behavioral changes
Requestis created manually by the user, then these fields are not filtered out.Fixes
debugoption with behavior since PR #820 (#860) by @AlexTMjugadorv0.41.0Compare Source
Breaking changes
EventFilterhas been changed to abitflagsstruct.tracingevent to multiple items in Sentry by combining multiple event filters in theevent_filter, e.g.tracing::Level::ERROR => EventFilter::Event | EventFilter::Log.EventMapping::Combinedto map atracingevent to multiple items in Sentry.ctxin the signatures ofevent_from_event,breadcrumb_from_eventandlog_from_eventhas been changed to takeimpl Into<Option<&'context Context<'context, S>>>to avoid cloning theContextwhen mapping to multiple items.Features
Fixes
i64::MAX(#846) by @lcianDependencies
anyhowand disable itsbacktracefeature (#632) by @LunaBorowskav0.40.0Compare Source
Breaking changes
send_default_pii(#843) by @lciansend_default_pii. Therefore, that parameter was removed fromsentry_core::Scope::apply_to_log.Features
tracingevents as Sentry structured logs, enable thelogsfeature of thesentrycrate.enable_logs: truein your client options.logrecords as Sentry structured logs, enable thelogsfeature of thesentrycrate.enable_logs: truein your client options.os.nameandos.versionare now being attached to logs as default attributes.Fixes
sentry.environmentdefault attribute (#837) by @lcianBehavioral changes
dataunder their original field name.errors.Dependencies
ureqto 3.x (#835) by @algestenv0.39.0Compare Source
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 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
Scopeis associated with an object holding some tracing information.Scope::iter_trace_propagation_headershas been provided that will use the fallback tracing information if there is no currentSpanon theScope.Breaking changes
debug-logsfeature (#820) by @lciandebug-logsfeature of thesentrycrate, used for the SDK's own internal logging, has been removed.Configuration
📅 Schedule: (UTC)
🚦 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.
This PR has been generated by Mend Renovate.
2f8fcad3db53f5ed9c52