mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-12 19:56:48 +00:00
chore: Bump sentry and update config to required builder pattern
This commit is contained in:
1 parent
a6b8bfe2c9
commit
4c62b96821
4 files changed
+42
-49
No files matched your search
Generated
+22
-22
@@ -5484,9 +5484,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d631477761f57c76148456e55e80e9a479ff3fa4c65b2b4a0c3acf1167fd4638"
|
||||
checksum = "9fa951f4e644464ebfd2347a7ab03b0828c512d2448a76262cad2607b343dff4"
|
||||
dependencies = [
|
||||
"cfg_aliases",
|
||||
"httpdate",
|
||||
@@ -5504,9 +5504,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-backtrace"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "448b0981fbde6cdc9eb087ba3dc01035a253fef9a0d9e79aaf198fc26acb2e64"
|
||||
checksum = "f4f27cf048aa63ccd5bc94c29989133eabb82e9c6bf7441b58e9d4a95837a105"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"regex",
|
||||
@@ -5515,9 +5515,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-contexts"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e5e909d02170ba6d1dc5ebd05bef7999280f5d960e3eaee5d1a18d88d41b334"
|
||||
checksum = "c5ed680585dbdacdf9859c2b4dc53358ff02bd256766882e22e343836db36b22"
|
||||
dependencies = [
|
||||
"hostname",
|
||||
"libc",
|
||||
@@ -5529,11 +5529,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-core"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ecf0b1a4a4e9ec88395b52e6fa4868b95564c1fa96b26a0606f5f6288a0f7149"
|
||||
checksum = "c3ed398494bb8fc412a11a182c1883a10ae147587b8f6314abd222d1d626f31b"
|
||||
dependencies = [
|
||||
"rand 0.9.5",
|
||||
"rand 0.10.3",
|
||||
"sentry-types",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -5542,9 +5542,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-debug-images"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f81d7749c57fc78ed52134889e8121da874065bc40da788d5798cce0f8c19f15"
|
||||
checksum = "55854bb40681e84ffd2a69578ad4ef9bfaf5bf2bf1380a745578b591fa24af22"
|
||||
dependencies = [
|
||||
"findshlibs",
|
||||
"sentry-core",
|
||||
@@ -5552,9 +5552,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-log"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11ffc7737b6d4f1cb3707284703c7364e9f5f056118abc523dd52e732f13cbe1"
|
||||
checksum = "9a3dc14009e1c24b07a8ff9ff8e1bcd0913b3e448b1565e679414776f2e58651"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"log",
|
||||
@@ -5563,9 +5563,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-panic"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b7d93d6ecb55d2251c5fc084c55c03a2bc68904918d76117e602c999e92f00f"
|
||||
checksum = "b7153e68642b761ed3aa62c022795c11b2facc728b2db7484084492373c944f9"
|
||||
dependencies = [
|
||||
"sentry-backtrace",
|
||||
"sentry-core",
|
||||
@@ -5573,9 +5573,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-tower"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a64a8a0a33239c65f95ff719fcb56655f398f4e4e74a01af8daca725cf7c2b5f"
|
||||
checksum = "624ee2c60caf72fa2cd6be00334b3a3ce0c6df3b1f01941ea62e3d244492d334"
|
||||
dependencies = [
|
||||
"http",
|
||||
"pin-project",
|
||||
@@ -5587,9 +5587,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-tracing"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "58d26379236c4ef97eaf081bca3c7bf0ef6f06b3aa881eca2ee8e8dbc923e5b8"
|
||||
checksum = "e7e7db1aefdf623f4e48e21ec9e4af535024187aeafb2a4cc7e29d035def5a13"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"sentry-backtrace",
|
||||
@@ -5600,13 +5600,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sentry-types"
|
||||
version = "0.48.5"
|
||||
version = "0.49.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2239099d47e76857b0825a182ecdb90159add7aa1097b60247c6e7ca6bf49c6a"
|
||||
checksum = "1c18bf7b159bdfc7c8f97816f476b4947a1937fb6bea9d38d3479e58631614ac"
|
||||
dependencies = [
|
||||
"debugid",
|
||||
"hex",
|
||||
"rand 0.9.5",
|
||||
"rand 0.10.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.21",
|
||||
|
||||
+3
-3
@@ -453,7 +453,7 @@ features = ["http", "grpc-tonic", "trace", "logs", "metrics"]
|
||||
|
||||
# optional sentry metrics for crash/panic reporting
|
||||
[workspace.dependencies.sentry]
|
||||
version = "0.48.0"
|
||||
version = "0.49.0"
|
||||
default-features = false
|
||||
features = [
|
||||
"backtrace",
|
||||
@@ -468,9 +468,9 @@ features = [
|
||||
]
|
||||
|
||||
[workspace.dependencies.sentry-tracing]
|
||||
version = "0.48.0"
|
||||
version = "0.49.0"
|
||||
[workspace.dependencies.sentry-tower]
|
||||
version = "0.48.0"
|
||||
version = "0.49.0"
|
||||
|
||||
# jemalloc usage
|
||||
[workspace.dependencies.tikv-jemalloc-sys]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Updated internal Sentry integration setup to the new pattern required by the SDK.
|
||||
+16
-24
@@ -1,19 +1,12 @@
|
||||
#![cfg(feature = "sentry_telemetry")]
|
||||
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
str::FromStr,
|
||||
sync::{Arc, OnceLock},
|
||||
};
|
||||
use std::{borrow::Cow, sync::OnceLock};
|
||||
|
||||
use conduwuit_build_metadata as build;
|
||||
use conduwuit_core::{config::Config, debug, trace};
|
||||
use sentry::{
|
||||
Breadcrumb, ClientOptions, Level,
|
||||
types::{
|
||||
Dsn,
|
||||
protocol::v7::{Context, Event},
|
||||
},
|
||||
types::protocol::v7::{Context, Event},
|
||||
};
|
||||
|
||||
static SEND_PANIC: OnceLock<bool> = OnceLock::new();
|
||||
@@ -37,22 +30,21 @@ fn options(config: &Config) -> ClientOptions {
|
||||
.expect("init_sentry should only be called if sentry is enabled and this is not None")
|
||||
.as_str();
|
||||
|
||||
let server_name = config
|
||||
.sentry_send_server_name
|
||||
.then(|| config.server_name.to_string().into());
|
||||
let options = ClientOptions::new()
|
||||
.dsn(dsn)
|
||||
.traces_sample_rate(config.sentry_traces_sample_rate)
|
||||
.debug(cfg!(debug_assertions))
|
||||
.maybe_release(release_name())
|
||||
.user_agent(conduwuit_core::user_agent())
|
||||
.attach_stacktrace(config.sentry_attach_stacktrace)
|
||||
.before_send(before_send)
|
||||
.before_breadcrumb(before_breadcrumb);
|
||||
|
||||
ClientOptions {
|
||||
dsn: Some(Dsn::from_str(dsn).expect("sentry_endpoint must be a valid URL")),
|
||||
server_name,
|
||||
traces_sample_rate: config.sentry_traces_sample_rate,
|
||||
debug: cfg!(debug_assertions),
|
||||
release: release_name(),
|
||||
user_agent: conduwuit_core::user_agent().into(),
|
||||
attach_stacktrace: config.sentry_attach_stacktrace,
|
||||
before_send: Some(Arc::new(before_send)),
|
||||
before_breadcrumb: Some(Arc::new(before_breadcrumb)),
|
||||
..Default::default()
|
||||
}
|
||||
config
|
||||
.sentry_send_server_name
|
||||
.then(|| config.server_name.to_string())
|
||||
.into_iter()
|
||||
.fold(options, ClientOptions::server_name)
|
||||
}
|
||||
|
||||
fn before_send(event: Event<'static>) -> Option<Event<'static>> {
|
||||
|
||||
Reference in new issue
Block a user