Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn main() {
.with(sentry::integrations::tracing::layer())
.init();

let _sentry = sentry::init(sentry::ClientOptions {
let _guard = sentry::init(sentry::ClientOptions {
release: sentry::release_name!(),
traces_sample_rate: 1.0,
// Capture user IPs and potentially sensitive headers when using HTTP server integrations
Expand Down Expand Up @@ -55,7 +55,7 @@ The Rust SDK offers an integration for the OpenTelemetry ecosystem.
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/).
The integration also captures errors with the correct span and trace associations.

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

To get started using the OpenTelemetry integration for the Sentry Rust SDK, add the necessary dependencies to your `Cargo.toml`:
Expand Down
2 changes: 1 addition & 1 deletion platform-includes/configuration/sample-rate/rust.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```rust
let _sentry = sentry::init(sentry::ClientOptions {
let _guard = sentry::init(sentry::ClientOptions {
sample_rate: 1.0,
..Default::default()
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```rust
let _sentry = sentry::init(sentry::ClientOptions {
let _guard = sentry::init(sentry::ClientOptions {
release: sentry::release_name!(),
// To set a uniform sample rate
traces_sample_rate: 0.2,
Expand Down
2 changes: 1 addition & 1 deletion platform-includes/performance/traces-sample-rate/rust.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```rust
let _sentry = sentry::init(sentry::ClientOptions {
let _guard = sentry::init(sentry::ClientOptions {
release: sentry::release_name!(),
traces_sample_rate: 1.0,
..Default::default()
Expand Down