Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify sentry dependencies #2699

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading