You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/collections/_documentation/clients/rust/index.md
+23-22Lines changed: 23 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Sentry-Rust is distributed as a normal crate from crates.io. You can add it to y
11
11
12
12
```
13
13
[dependencies]
14
-
sentry = "0.6.0"
14
+
sentry = "0.9.0"
15
15
```
16
16
17
17
Additionally you can configure a bunch of features to enable or disable functionality in the crate. By default the most common features are compiled into the crate. For a list of features that are available refer to the [API Documentation](https://docs.rs/sentry).
@@ -20,32 +20,33 @@ Additionally you can configure a bunch of features to enable or disable function
20
20
21
21
The client is configured by calling `sentry::init` with a value that can be converted into a configuration object. These are the most common values:
22
22
23
-
-_an empty tuple_: in that case the client is configured from the `SENTRY_DSN` environment variable.
23
+
-_an empty tuple_: in that case the client is configured from the `SENTRY_DSN` environment variably only.
24
24
-_a string holding a DSN_: if you pass a string then a DSN is parsed and the client is initialized with that DSN.
25
25
-_a tuple in the form (dsn, options)_: This is a form where the client is configured with a DSN plus an options object that allows you to configure additional features.
26
+
-_just options_: In that case everything (including the DSN) are configured from the passed options.
26
27
27
28
This is the most common case for client configuration:
28
29
29
30
```rust
30
-
externcrate sentry;
31
+
externcrate sentry;
31
32
32
33
fnmain() {
33
-
sentry::init("___PUBLIC_DSN___");
34
-
// code using sentry goes here.
34
+
sentry::init("___PUBLIC_DSN___");
35
+
// code using sentry goes here.
35
36
}
36
37
```
37
38
38
39
To configure releases automatically you can use the `sentry_crate_release!` macro in combination with the tuple config syntax:
0 commit comments