pingora
pingora copied to clipboard
[Feature] Make sentry optional
If we make sentry an optional feature, the number of dependencies in pingora-core will decrease by around 70+. And it will significantly reduce the size of the binary.
working on this right now
I'm getting a build error on main after the Sentry option PR https://github.com/cloudflare/pingora/pull/410
env RUST_BACKTRACE=full RUST_LOG=INFO mold --run cargo run --example test --release --no-default-features --features=boringssl
Compiling pingora-core v0.3.0 (~/Library/rust/pingora/pingora-core)
error[E0433]: failed to resolve: use of undeclared crate or module `sentry`
--> pingora-core/src/server/mod.rs:122:29
|
122 | ... sentry::capture_error(&e);
| ^^^^^^ use of undeclared crate or module `sentry`
error[E0609]: no field `sentry` on type `&mut Server`
--> pingora-core/src/server/mod.rs:264:27
|
264 | let _guard = self.sentry.as_ref().map(|opts| sentry::init(opts.clone()));
| ^^^^^^ unknown field
|
= note: available fields are: `services`, `listen_fds`, `shutdown_watch`, `shutdown_recv`, `configuration`, `options`
error[E0433]: failed to resolve: use of undeclared crate or module `sentry`
--> pingora-core/src/server/mod.rs:264:54
|
264 | let _guard = self.sentry.as_ref().map(|opts| sentry::init(opts.clone()));
| ^^^^^^ use of undeclared crate or module `sentry`
error[E0433]: failed to resolve: use of undeclared crate or module `sentry`
--> pingora-core/src/server/mod.rs:279:17
|
279 | sentry::capture_error(&e);
| ^^^^^^ use of undeclared crate or module `sentry`
error[E0609]: no field `sentry` on type `Server`
--> pingora-core/src/server/mod.rs:308:27
|
308 | let _guard = self.sentry.as_ref().map(|opts| sentry::init(opts.clone()));
| ^^^^^^ unknown field
|
= note: available fields are: `services`, `listen_fds`, `shutdown_watch`, `shutdown_recv`, `configuration`, `options`
error[E0433]: failed to resolve: use of undeclared crate or module `sentry`
--> pingora-core/src/server/mod.rs:308:54
|
308 | let _guard = self.sentry.as_ref().map(|opts| sentry::init(opts.clone()));
| ^^^^^^ use of undeclared crate or module `sentry`
Some errors have detailed explanations: E0433, E0609.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `pingora-core` (lib) due to 6 previous errors
I'm getting a build error on main after the Sentry option PR https://github.com/cloudflare/pingora/pull/410
https://github.com/cloudflare/pingora/pull/399#issuecomment-2398927180