mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-29 08:14:26 +01:00
add sentry as default feature
This commit is contained in:
parent
57e515d5e2
commit
b89e76ccb4
@ -13,6 +13,9 @@ edition = "2018"
|
|||||||
name = "meilisearch"
|
name = "meilisearch"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["sentry"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-cors = "0.2.0"
|
actix-cors = "0.2.0"
|
||||||
actix-files = "0.2.1"
|
actix-files = "0.2.1"
|
||||||
@ -48,7 +51,7 @@ tokio = { version = "0.2.18", features = ["macros"] }
|
|||||||
ureq = { version = "0.12.0", features = ["tls"], default-features = false }
|
ureq = { version = "0.12.0", features = ["tls"], default-features = false }
|
||||||
walkdir = "2.3.1"
|
walkdir = "2.3.1"
|
||||||
whoami = "0.8.1"
|
whoami = "0.8.1"
|
||||||
sentry = { version = "0.18.0", features = ["with_rustls", "with_env_logger"] }
|
sentry = { version = "0.18.0", features = ["with_rustls", "with_env_logger"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
http-service = "0.4.0"
|
http-service = "0.4.0"
|
||||||
|
@ -19,6 +19,7 @@ static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
|||||||
async fn main() -> Result<(), MainError> {
|
async fn main() -> Result<(), MainError> {
|
||||||
let opt = Opt::from_args();
|
let opt = Opt::from_args();
|
||||||
|
|
||||||
|
#[cfg(feature = "sentry")]
|
||||||
let _sentry = sentry::init((
|
let _sentry = sentry::init((
|
||||||
"https://5ddfa22b95f241198be2271aaf028653@sentry.io/3060337",
|
"https://5ddfa22b95f241198be2271aaf028653@sentry.io/3060337",
|
||||||
sentry::ClientOptions {
|
sentry::ClientOptions {
|
||||||
@ -35,6 +36,8 @@ async fn main() -> Result<(), MainError> {
|
|||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "sentry")]
|
||||||
if !opt.no_analytics {
|
if !opt.no_analytics {
|
||||||
sentry::integrations::panic::register_panic_handler();
|
sentry::integrations::panic::register_panic_handler();
|
||||||
sentry::integrations::env_logger::init(None, Default::default());
|
sentry::integrations::env_logger::init(None, Default::default());
|
||||||
|
Loading…
Reference in New Issue
Block a user