We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
default()
ClientOptions
mut
1 parent 84495e3 commit d684b01Copy full SHA for d684b01
src/sentry.rs
@@ -16,14 +16,20 @@ pub fn init() -> Option<ClientInitGuard> {
16
.into_dsn()
17
.expect("SENTRY_DSN_API is not a valid Sentry DSN value")
18
.map(|dsn| {
19
- let mut opts = ClientOptions::from(dsn);
20
- opts.environment = Some(
+ let environment = Some(
21
dotenv::var("SENTRY_ENV_API")
22
.map(Cow::Owned)
23
.expect("SENTRY_ENV_API must be set when using SENTRY_DSN_API"),
24
);
25
26
- opts.release = dotenv::var("HEROKU_SLUG_COMMIT").ok().map(Into::into);
+ let release = dotenv::var("HEROKU_SLUG_COMMIT").ok().map(Into::into);
+
27
+ let opts = ClientOptions {
28
+ dsn: Some(dsn),
29
+ environment,
30
+ release,
31
+ ..Default::default()
32
+ };
33
34
sentry::init(opts)
35
})
0 commit comments