Skip to content

Commit a423ee5

Browse files
authored
ref(rust): standardize client init guard name (#14463)
1 parent 4a1d2ff commit a423ee5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424
.with(sentry::integrations::tracing::layer())
2525
.init();
2626

27-
let _sentry = sentry::init(sentry::ClientOptions {
27+
let _guard = sentry::init(sentry::ClientOptions {
2828
release: sentry::release_name!(),
2929
traces_sample_rate: 1.0,
3030
// Capture user IPs and potentially sensitive headers when using HTTP server integrations
@@ -55,7 +55,7 @@ The Rust SDK offers an integration for the OpenTelemetry ecosystem.
5555
The integration can automatically capture Sentry [spans/transactions](/concepts/key-terms/tracing/distributed-tracing/#traces-transactions-and-spans) for every span created through the OpenTelemetry API, with support for [distributed tracing](/concepts/key-terms/tracing/distributed-tracing/).
5656
The integration also captures errors with the correct span and trace associations.
5757

58-
For this integration to work as intended, only the OpenTelemetry tracing API should be used to manage spans.
58+
For this integration to work as intended, only the OpenTelemetry tracing API should be used to manage spans.
5959
Mixing it with the Sentry tracing API will result in incorrectly nested spans.
6060

6161
To get started using the OpenTelemetry integration for the Sentry Rust SDK, add the necessary dependencies to your `Cargo.toml`:

platform-includes/configuration/sample-rate/rust.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```rust
2-
let _sentry = sentry::init(sentry::ClientOptions {
2+
let _guard = sentry::init(sentry::ClientOptions {
33
sample_rate: 1.0,
44
..Default::default()
55
});

platform-includes/performance/configure-sample-rate/rust.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```rust
2-
let _sentry = sentry::init(sentry::ClientOptions {
2+
let _guard = sentry::init(sentry::ClientOptions {
33
release: sentry::release_name!(),
44
// To set a uniform sample rate
55
traces_sample_rate: 0.2,

platform-includes/performance/traces-sample-rate/rust.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```rust
2-
let _sentry = sentry::init(sentry::ClientOptions {
2+
let _guard = sentry::init(sentry::ClientOptions {
33
release: sentry::release_name!(),
44
traces_sample_rate: 1.0,
55
..Default::default()

0 commit comments

Comments
 (0)