mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 16:21:07 +00:00
add sentry probe
This commit is contained in:
@ -48,6 +48,7 @@ tokio = { version = "0.2.18", features = ["macros"] }
|
||||
ureq = { version = "0.12.0", features = ["tls"], default-features = false }
|
||||
walkdir = "2.3.1"
|
||||
whoami = "0.8.1"
|
||||
sentry = { version = "0.18.0", features = ["with_rustls", "with_env_logger"] }
|
||||
|
||||
[dev-dependencies]
|
||||
http-service = "0.4.0"
|
||||
|
@ -19,6 +19,14 @@ static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
async fn main() -> Result<(), MainError> {
|
||||
let opt = Opt::from_args();
|
||||
|
||||
let _sentry = sentry::init((
|
||||
"https://5ddfa22b95f241198be2271aaf028653@sentry.io/3060337",
|
||||
sentry::ClientOptions {
|
||||
release: sentry::release_name!(),
|
||||
..Default::default()
|
||||
},
|
||||
));
|
||||
|
||||
match opt.env.as_ref() {
|
||||
"production" => {
|
||||
if opt.master_key.is_none() {
|
||||
@ -27,6 +35,10 @@ async fn main() -> Result<(), MainError> {
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
if !opt.no_analytics {
|
||||
sentry::integrations::panic::register_panic_handler();
|
||||
sentry::integrations::env_logger::init(None, Default::default());
|
||||
}
|
||||
}
|
||||
"development" => {
|
||||
env_logger::from_env(env_logger::Env::default().default_filter_or("info")).init();
|
||||
|
Reference in New Issue
Block a user