Skip to content

Commit 6504d1b

Browse files
committed
simplify sentry dependencies
1 parent a9496dd commit 6504d1b

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

Cargo.lock

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ exclude = [
1717
]
1818

1919
[dependencies]
20-
sentry = "0.35.0"
21-
sentry-panic = "0.35.0"
22-
sentry-tracing = "0.35.0"
23-
sentry-tower = { version = "0.35.0", features = ["http"] }
24-
sentry-anyhow = { version = "0.35.0", features = ["backtrace"] }
20+
sentry = { version = "0.35.0", features = ["panic", "tracing", "tower-http", "anyhow", "backtrace"] }
2521
log = "0.4"
2622
tracing = "0.1.37"
2723
tracing-subscriber = { version = "0.3.16", default-features = false, features = ["ansi", "fmt", "json", "env-filter", "tracing-log"] }

src/bin/cratesfyi.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ use docs_rs::{
2323
use futures_util::StreamExt;
2424
use humantime::Duration;
2525
use once_cell::sync::OnceCell;
26-
use sentry::TransactionContext;
26+
use sentry::{
27+
integrations::panic as sentry_panic, integrations::tracing as sentry_tracing,
28+
TransactionContext,
29+
};
2730
use tokio::runtime::{Builder, Runtime};
2831
use tracing_log::LogTracer;
2932
use tracing_subscriber::{filter::Directive, prelude::*, EnvFilter};

src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use std::{future::Future, thread, time::Duration};
3434
pub(crate) fn report_error(err: &anyhow::Error) {
3535
// Debug-format for anyhow errors includes context & backtrace
3636
if std::env::var("SENTRY_DSN").is_ok() {
37-
sentry_anyhow::capture_anyhow(err);
37+
sentry::integrations::anyhow::capture_anyhow(err);
3838
error!(reported_to_sentry = true, "{err:?}");
3939
} else {
4040
error!("{err:?}");

src/web/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ use error::AxumNope;
5151
use page::TemplateData;
5252
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
5353
use semver::{Version, VersionReq};
54+
use sentry::integrations::tower as sentry_tower;
5455
use serde_with::{DeserializeFromStr, SerializeDisplay};
5556
use std::{
5657
borrow::{Borrow, Cow},

0 commit comments

Comments
 (0)