Skip to content

Commit

Permalink
feat: enable sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Jan 3, 2024
1 parent 220820c commit 38fb61a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ run apt-get update \
wget unzip clang \
cmake llvm nettle-dev \
pkg-config \
libssl-dev ca-certificates \
&& rm -rf /var/lib/apt/lists/*

copy --from=plan /src/download_font.sh .
Expand Down
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ assert_one_feature!("plot_plotters", "plot_matplotlib");
async fn main() -> Result<()> {
dotenv::dotenv().ok();

let sentry_dsn = env_var("SENTRY_DSN")?;
let _guard = sentry::init((
sentry_dsn,
sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
},
));

let use_ansi = env_var("NO_COLOR").is_err();

tracing_subscriber::fmt().with_ansi(use_ansi).init();
Expand Down

0 comments on commit 38fb61a

Please sign in to comment.