Skip to content

Commit

Permalink
simplify sentry dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Dec 26, 2024
1 parent a9496dd commit 6504d1b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ exclude = [
]

[dependencies]
sentry = "0.35.0"
sentry-panic = "0.35.0"
sentry-tracing = "0.35.0"
sentry-tower = { version = "0.35.0", features = ["http"] }
sentry-anyhow = { version = "0.35.0", features = ["backtrace"] }
sentry = { version = "0.35.0", features = ["panic", "tracing", "tower-http", "anyhow", "backtrace"] }
log = "0.4"
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.16", default-features = false, features = ["ansi", "fmt", "json", "env-filter", "tracing-log"] }
Expand Down
5 changes: 4 additions & 1 deletion src/bin/cratesfyi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ use docs_rs::{
use futures_util::StreamExt;
use humantime::Duration;
use once_cell::sync::OnceCell;
use sentry::TransactionContext;
use sentry::{
integrations::panic as sentry_panic, integrations::tracing as sentry_tracing,
TransactionContext,
};
use tokio::runtime::{Builder, Runtime};
use tracing_log::LogTracer;
use tracing_subscriber::{filter::Directive, prelude::*, EnvFilter};
Expand Down
2 changes: 1 addition & 1 deletion src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use std::{future::Future, thread, time::Duration};
pub(crate) fn report_error(err: &anyhow::Error) {
// Debug-format for anyhow errors includes context & backtrace
if std::env::var("SENTRY_DSN").is_ok() {
sentry_anyhow::capture_anyhow(err);
sentry::integrations::anyhow::capture_anyhow(err);
error!(reported_to_sentry = true, "{err:?}");
} else {
error!("{err:?}");
Expand Down
1 change: 1 addition & 0 deletions src/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ use error::AxumNope;
use page::TemplateData;
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
use semver::{Version, VersionReq};
use sentry::integrations::tower as sentry_tower;
use serde_with::{DeserializeFromStr, SerializeDisplay};
use std::{
borrow::{Borrow, Cow},
Expand Down

0 comments on commit 6504d1b

Please sign in to comment.