From 9ef74566536487d23d1f15bd313dcb548642df4e Mon Sep 17 00:00:00 2001
From: "sentry-junior[bot]"
<264270552+sentry-junior[bot]@users.noreply.github.com>
Date: Wed, 28 Oct 2026 11:44:17 +0000
Subject: [PATCH 1/4] docs(rust): Use new sentry-tracing layers
sentry-rust 0.49.4 deprecated sentry::integrations::tracing::layer(),
SentryLayer, and EventFilter in favor of independently selectable
SpanLayer, LogLayer, ErrorLayer, and BreadcrumbLayer. Update the tracing
guide, logs page, and automatic instrumentation page to use the new
layers with explicit level filters.
Resolves #20289
Co-Authored-By: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
---
docs/platforms/rust/common/logs/index.mdx | 24 ++------
.../automatic-instrumentation.mdx | 7 ++-
docs/platforms/rust/guides/tracing/index.mdx | 56 ++++++++++++-------
3 files changed, 47 insertions(+), 40 deletions(-)
diff --git a/docs/platforms/rust/common/logs/index.mdx b/docs/platforms/rust/common/logs/index.mdx
index 700e3f79422a7..b80d921788cee 100644
--- a/docs/platforms/rust/common/logs/index.mdx
+++ b/docs/platforms/rust/common/logs/index.mdx
@@ -70,8 +70,9 @@ tracing-subscriber = "0.3.19"
Then, use standard `tracing` macros to capture logs.
```rust {filename:main.rs}
-use sentry::integrations::tracing::EventFilter;
+use sentry::integrations::tracing::LogLayer;
use tracing::{error, info, warn};
+use tracing_subscriber::filter::LevelFilter;
use tracing_subscriber::prelude::*;
fn main() {
@@ -83,7 +84,7 @@ fn main() {
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer())
- .with(sentry::integrations::tracing::layer())
+ .with(LogLayer::new().with_filter(LevelFilter::INFO))
.init();
info!("Hello, world!");
@@ -101,24 +102,9 @@ fn main() {
The fields of `tracing` events are automatically captured as attributes in Sentry logs.
-By default, `tracing` events at or above info level are captured as Sentry logs.
+`LogLayer` captures every event its filter accepts. The example above captures `INFO`, `WARN`, and `ERROR` events. To change which events become logs, adjust the `LevelFilter` or use any other `tracing_subscriber` filter.
-This behavior can be customized by applying a custom `event_filter` when creating the layer.
-The following snippet shows the default `event_filter`:
-
-```rust
-use sentry::integrations::tracing::EventFilter;
-
-let sentry_layer =
- sentry::integrations::tracing::layer().event_filter(|md| match *md.level() {
- // Capture error and warn level events as both logs and events in Sentry
- tracing::Level::ERROR => EventFilter::Event | EventFilter::Log,
- // Ignore trace level events, as they're too verbose
- tracing::Level::TRACE => EventFilter::Ignore,
- // Capture everything else as both a breadcrumb and a log
- _ => EventFilter::Breadcrumb | EventFilter::Log,
- });
-```
+To also capture spans, errors, or breadcrumbs from `tracing`, see the [`tracing` integration guide](/platforms/rust/guides/tracing/).
### `log` Integration
diff --git a/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx b/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
index 99e4c1bd19549..877e29e0d5f2f 100644
--- a/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
+++ b/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
@@ -19,9 +19,14 @@ The Rust SDK offers an integration for the `tracing` ecosystem that will track s
The integration takes care of starting a new transaction or a new child span of an already running transaction, and it automatically sets the created span as the _current_ span.
```rust
+use sentry::integrations::tracing::SpanLayer;
+use tracing_subscriber::filter::LevelFilter;
+use tracing_subscriber::prelude::*;
+
fn main() {
tracing_subscriber::Registry::default()
- .with(sentry::integrations::tracing::layer())
+ // Capture INFO, WARN, and ERROR spans
+ .with(SpanLayer::new().with_filter(LevelFilter::INFO))
.init();
let _guard = sentry::init(
diff --git a/docs/platforms/rust/guides/tracing/index.mdx b/docs/platforms/rust/guides/tracing/index.mdx
index e3584f8578a6d..763bd1d293c15 100644
--- a/docs/platforms/rust/guides/tracing/index.mdx
+++ b/docs/platforms/rust/guides/tracing/index.mdx
@@ -38,6 +38,15 @@ Macros like `#[tokio::main]` and `#[actix_web::main]` are not supported. The Sen
```rust
+use sentry::integrations::tracing::{BreadcrumbLayer, ErrorLayer};
+# ___PRODUCT_OPTION_START___ logs
+use sentry::integrations::tracing::LogLayer;
+# ___PRODUCT_OPTION_END___ logs
+# ___PRODUCT_OPTION_START___ performance
+use sentry::integrations::tracing::SpanLayer;
+# ___PRODUCT_OPTION_END___ performance
+use tracing::Level;
+use tracing_subscriber::filter::{filter_fn, LevelFilter};
use tracing_subscriber::prelude::*;
fn main() {
@@ -52,10 +61,23 @@ fn main() {
# ___PRODUCT_OPTION_END___ performance
);
- // Register the Sentry tracing layer
+ // Register the Sentry tracing layers
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer())
- .with(sentry::integrations::tracing::layer())
+ # ___PRODUCT_OPTION_START___ performance
+ // Capture spans as Sentry transactions and spans
+ .with(SpanLayer::new().with_filter(LevelFilter::INFO))
+ # ___PRODUCT_OPTION_END___ performance
+ // Add INFO and WARN events as breadcrumbs to subsequent errors
+ .with(BreadcrumbLayer::new().with_filter(filter_fn(|metadata| {
+ matches!(*metadata.level(), Level::INFO | Level::WARN)
+ })))
+ // Capture ERROR events as Sentry errors
+ .with(ErrorLayer::new().with_filter(LevelFilter::ERROR))
+ # ___PRODUCT_OPTION_START___ logs
+ // Capture INFO, WARN, and ERROR events as Sentry logs
+ .with(LogLayer::new().with_filter(LevelFilter::INFO))
+ # ___PRODUCT_OPTION_END___ logs
.init();
tokio::runtime::Builder::new_multi_thread()
@@ -72,7 +94,7 @@ fn main() {
#[tracing::instrument] // Captures a root span (transaction) around this function execution
# ___PRODUCT_OPTION_END___ performance
async fn fail() {
- tracing::debug!("Doing work"); // Adds a breadrcumb
+ tracing::info!("Doing work"); // Adds a breadcrumb (and a log, if enabled)
# ___PRODUCT_OPTION_START___ performance
let _span = tracing::info_span("Child span").entered(); // Captures a child span
# ___PRODUCT_OPTION_END___ performance
@@ -80,26 +102,20 @@ async fn fail() {
}
```
-By default, error-level events from `tracing` are captured as Sentry events, while events at or above info level are added to the current scope as breadcrumbs.
+Each layer turns `tracing` data into a different kind of Sentry data, so you can install only the ones you need:
-Additionally, the SDK captures [logs](https://docs.sentry.io/product/logs/) for `tracing` events at the info level or above, unless logs were disabled when initializing the SDK.
+- `SpanLayer`: Captures spans as Sentry transactions and spans.
+- `LogLayer`: Captures events as Sentry logs. Requires the `logs` feature, which is enabled by default.
+- `ErrorLayer`: Captures events as Sentry errors.
+- `BreadcrumbLayer`: Adds events as breadcrumbs, which are sent with subsequent errors.
-This behavior can be customized by applying a custom `event_filter` when creating the layer.
-The following snippet shows the default `event_filter` that's applied when using the `sentry` crate with the `tracing` feature flag.
+The layers don't filter by level on their own, so give each one a `tracing_subscriber` filter, as shown above. Without a filter, a layer captures every level, including `DEBUG` and `TRACE`. On `ErrorLayer`, that can quickly use up your error quota.
-```rust
-use sentry::integrations::tracing::EventFilter;
-
-let sentry_layer =
- sentry::integrations::tracing::layer().event_filter(|md| match *md.level() {
- // Capture error and warn level events as both logs and events in Sentry
- tracing::Level::ERROR => EventFilter::Event | EventFilter::Log,
- // Ignore trace level events, as they're too verbose
- tracing::Level::TRACE => EventFilter::Ignore,
- // Capture everything else as both a breadcrumb and a log
- _ => EventFilter::Breadcrumb | EventFilter::Log,
- });
-```
+
+
+`sentry::integrations::tracing::layer()` and `SentryLayer` are deprecated as of version `0.49.4`. When migrating, replace the legacy layer instead of adding the new layers alongside it: combining `SpanLayer` with the legacy layer can panic. See the [migration guide](https://docs.rs/sentry-tracing/0.49.4/sentry_tracing/struct.SentryLayer.html) for details.
+
+
## Verify
From 5b59b52fcc7b7765258660d60972d17386242715 Mon Sep 17 00:00:00 2001
From: "sentry-junior[bot]"
<264270552+sentry-junior[bot]@users.noreply.github.com>
Date: Wed, 28 Oct 2026 11:55:48 +0000
Subject: [PATCH 2/4] docs(rust): Recommend only span and log tracing layers
Drop ErrorLayer and BreadcrumbLayer from the tracing guide example and
mention them only as legacy options. Remove the product option toggles
from the guide, since the example no longer depends on them. Link the
layer API docs, point the migration guide at the latest 0.49.x release,
and explain LogLayer filtering on the logs page.
---
docs/platforms/rust/common/logs/index.mdx | 7 +--
docs/platforms/rust/guides/tracing/index.mdx | 63 ++++++--------------
2 files changed, 20 insertions(+), 50 deletions(-)
diff --git a/docs/platforms/rust/common/logs/index.mdx b/docs/platforms/rust/common/logs/index.mdx
index b80d921788cee..e1a1a796a815a 100644
--- a/docs/platforms/rust/common/logs/index.mdx
+++ b/docs/platforms/rust/common/logs/index.mdx
@@ -67,7 +67,8 @@ tracing = "0.1.41"
tracing-subscriber = "0.3.19"
```
-Then, use standard `tracing` macros to capture logs.
+Then, register the [`LogLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.LogLayer.html) with your `tracing` subscriber, and use standard `tracing` macros to capture logs.
+Without a filter, `LogLayer` captures events at every level, including `DEBUG` and `TRACE`, so we recommend adding a level filter. `LevelFilter::INFO` is a sensible starting point for most applications.
```rust {filename:main.rs}
use sentry::integrations::tracing::LogLayer;
@@ -102,9 +103,7 @@ fn main() {
The fields of `tracing` events are automatically captured as attributes in Sentry logs.
-`LogLayer` captures every event its filter accepts. The example above captures `INFO`, `WARN`, and `ERROR` events. To change which events become logs, adjust the `LevelFilter` or use any other `tracing_subscriber` filter.
-
-To also capture spans, errors, or breadcrumbs from `tracing`, see the [`tracing` integration guide](/platforms/rust/guides/tracing/).
+To also capture `tracing` spans, see the [`tracing` integration guide](/platforms/rust/guides/tracing/).
### `log` Integration
diff --git a/docs/platforms/rust/guides/tracing/index.mdx b/docs/platforms/rust/guides/tracing/index.mdx
index 763bd1d293c15..2d5667027c76d 100644
--- a/docs/platforms/rust/guides/tracing/index.mdx
+++ b/docs/platforms/rust/guides/tracing/index.mdx
@@ -5,16 +5,12 @@ description: "Learn about monitoring your Rust application with Sentry's tokio-r
The Sentry SDK offers an integration for tokio's [tracing](https://github.com/tokio-rs/tracing) ecosystem that supports:
-- Reporting `tracing` events to Sentry as events, breadcrumbs, or logs.
-- Reporting `tracing` spans to Sentry.
+- Reporting `tracing` spans to Sentry as transactions and spans.
+- Reporting `tracing` events to Sentry as logs.
- Reporting errors and panics with the correct trace correlation.
## Install
-
-
To add Sentry with the `tracing` integration to your Rust project, add the necessary dependencies to your `Cargo.toml`:
```toml {filename:Cargo.toml}
@@ -29,7 +25,7 @@ tokio = { version = "1.45.0", features = ["full"] }
## Configure
-Initialize the Sentry SDK and register the Sentry layer to start sending `tracing` events and spans to Sentry:
+Initialize the Sentry SDK and register the Sentry layers to start sending `tracing` spans and logs to Sentry:
@@ -38,15 +34,8 @@ Macros like `#[tokio::main]` and `#[actix_web::main]` are not supported. The Sen
```rust
-use sentry::integrations::tracing::{BreadcrumbLayer, ErrorLayer};
-# ___PRODUCT_OPTION_START___ logs
-use sentry::integrations::tracing::LogLayer;
-# ___PRODUCT_OPTION_END___ logs
-# ___PRODUCT_OPTION_START___ performance
-use sentry::integrations::tracing::SpanLayer;
-# ___PRODUCT_OPTION_END___ performance
-use tracing::Level;
-use tracing_subscriber::filter::{filter_fn, LevelFilter};
+use sentry::integrations::tracing::{LogLayer, SpanLayer};
+use tracing_subscriber::filter::LevelFilter;
use tracing_subscriber::prelude::*;
fn main() {
@@ -55,29 +44,17 @@ fn main() {
sentry::ClientOptions::new()
.dsn("___PUBLIC_DSN___")
.maybe_release(sentry::release_name!())
- # ___PRODUCT_OPTION_START___ performance
// Capture all traces and spans. Set to a lower value in production
.traces_sample_rate(1.0)
- # ___PRODUCT_OPTION_END___ performance
);
// Register the Sentry tracing layers
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer())
- # ___PRODUCT_OPTION_START___ performance
- // Capture spans as Sentry transactions and spans
+ // Capture INFO, WARN, and ERROR spans as Sentry transactions and spans
.with(SpanLayer::new().with_filter(LevelFilter::INFO))
- # ___PRODUCT_OPTION_END___ performance
- // Add INFO and WARN events as breadcrumbs to subsequent errors
- .with(BreadcrumbLayer::new().with_filter(filter_fn(|metadata| {
- matches!(*metadata.level(), Level::INFO | Level::WARN)
- })))
- // Capture ERROR events as Sentry errors
- .with(ErrorLayer::new().with_filter(LevelFilter::ERROR))
- # ___PRODUCT_OPTION_START___ logs
// Capture INFO, WARN, and ERROR events as Sentry logs
.with(LogLayer::new().with_filter(LevelFilter::INFO))
- # ___PRODUCT_OPTION_END___ logs
.init();
tokio::runtime::Builder::new_multi_thread()
@@ -90,30 +67,26 @@ fn main() {
});
}
-# ___PRODUCT_OPTION_START___ performance
#[tracing::instrument] // Captures a root span (transaction) around this function execution
-# ___PRODUCT_OPTION_END___ performance
async fn fail() {
- tracing::info!("Doing work"); // Adds a breadcrumb (and a log, if enabled)
- # ___PRODUCT_OPTION_START___ performance
+ tracing::info!("Doing work"); // Captured as a log
let _span = tracing::info_span("Child span").entered(); // Captures a child span
- # ___PRODUCT_OPTION_END___ performance
- tracing::error!("Everything is on fire!");
+ tracing::error!("Everything is on fire!"); // Captured as a log, linked to the child span
}
```
-Each layer turns `tracing` data into a different kind of Sentry data, so you can install only the ones you need:
+The integration provides two layers, and we recommend installing both:
+
+- [`SpanLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.SpanLayer.html): Captures `tracing` spans as Sentry transactions and spans.
+- [`LogLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.LogLayer.html): Captures `tracing` events as Sentry logs. Requires the `logs` feature, which is enabled by default.
-- `SpanLayer`: Captures spans as Sentry transactions and spans.
-- `LogLayer`: Captures events as Sentry logs. Requires the `logs` feature, which is enabled by default.
-- `ErrorLayer`: Captures events as Sentry errors.
-- `BreadcrumbLayer`: Adds events as breadcrumbs, which are sent with subsequent errors.
+The layers don't filter by level on their own, and without a filter they capture every level, including `DEBUG` and `TRACE`. We recommend giving each layer a `tracing_subscriber` filter, as shown above. `LevelFilter::INFO` is a sensible starting point for most applications.
-The layers don't filter by level on their own, so give each one a `tracing_subscriber` filter, as shown above. Without a filter, a layer captures every level, including `DEBUG` and `TRACE`. On `ErrorLayer`, that can quickly use up your error quota.
+The SDK also provides [`ErrorLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.ErrorLayer.html) and [`BreadcrumbLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.BreadcrumbLayer.html), which capture `tracing` events as Sentry errors and breadcrumbs. They're mainly there to support legacy setups, so most applications should stick with the span and log layers.
-`sentry::integrations::tracing::layer()` and `SentryLayer` are deprecated as of version `0.49.4`. When migrating, replace the legacy layer instead of adding the new layers alongside it: combining `SpanLayer` with the legacy layer can panic. See the [migration guide](https://docs.rs/sentry-tracing/0.49.4/sentry_tracing/struct.SentryLayer.html) for details.
+`sentry::integrations::tracing::layer()` and `SentryLayer` are deprecated as of version `0.49.4`. When migrating, replace the legacy layer instead of adding the new layers alongside it: combining `SpanLayer` with the legacy layer can panic. See the [migration guide](https://docs.rs/sentry-tracing/~0.49/sentry_tracing/struct.SentryLayer.html) for details.
@@ -125,11 +98,9 @@ Learn more about manually capturing an error or message in our
-To view and resolve the recorded error, log into [sentry.io](https://sentry.io) and select your project. Select Issues, and then Errors & Outages in the sidebar, where you will find the newly created issue. Clicking on the issue's title will open a page where you can see detailed information and mark it as resolved.
-
-If you're using tracing (the Sentry feature), you can view the recorded traces and spans by selecting Explore, and then Traces in the sidebar.
+To view the recorded traces and spans, log into [sentry.io](https://sentry.io), select your project, and then select Explore > Traces in the sidebar.
-If you're using logs, you can view the recorded logs by selecting Explore, and then Logs in the sidebar.
+To view the recorded logs, select Explore > Logs in the sidebar.
## Next Steps
From eb78eda3b153edc7497a67010d2a0fad7141c7c6 Mon Sep 17 00:00:00 2001
From: "sentry-junior[bot]"
<264270552+sentry-junior[bot]@users.noreply.github.com>
Date: Wed, 28 Oct 2026 12:04:17 +0000
Subject: [PATCH 3/4] docs(rust): Move filter guidance after tracing layer
examples
Place the LogLayer filter recommendation after the example on the logs
page, and describe automatic instrumentation in terms of SpanLayer with
the same filter recommendation.
---
docs/platforms/rust/common/logs/index.mdx | 3 ++-
.../tracing/instrumentation/automatic-instrumentation.mdx | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/docs/platforms/rust/common/logs/index.mdx b/docs/platforms/rust/common/logs/index.mdx
index e1a1a796a815a..1096e677739dc 100644
--- a/docs/platforms/rust/common/logs/index.mdx
+++ b/docs/platforms/rust/common/logs/index.mdx
@@ -68,7 +68,6 @@ tracing-subscriber = "0.3.19"
```
Then, register the [`LogLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.LogLayer.html) with your `tracing` subscriber, and use standard `tracing` macros to capture logs.
-Without a filter, `LogLayer` captures events at every level, including `DEBUG` and `TRACE`, so we recommend adding a level filter. `LevelFilter::INFO` is a sensible starting point for most applications.
```rust {filename:main.rs}
use sentry::integrations::tracing::LogLayer;
@@ -103,6 +102,8 @@ fn main() {
The fields of `tracing` events are automatically captured as attributes in Sentry logs.
+Without a filter, `LogLayer` captures events at every level, including `DEBUG` and `TRACE`, so we recommend adding a level filter, as shown in the example above. `LevelFilter::INFO` is a sensible starting point for most applications.
+
To also capture `tracing` spans, see the [`tracing` integration guide](/platforms/rust/guides/tracing/).
### `log` Integration
diff --git a/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx b/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
index 877e29e0d5f2f..72437bb98319b 100644
--- a/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
+++ b/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
@@ -14,9 +14,9 @@ Capturing transactions requires that you first set
## `tracing` Integration
-The Rust SDK offers an integration for the `tracing` ecosystem that will track spans automatically for every function that is annotated with `#[tracing::instrument]`.
+The Rust SDK's [`SpanLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.SpanLayer.html) captures `tracing` spans as Sentry spans, so every function annotated with `#[tracing::instrument]` is tracked automatically.
-The integration takes care of starting a new transaction or a new child span of an already running transaction, and it automatically sets the created span as the _current_ span.
+The layer takes care of starting a new transaction or a new child span of an already running transaction, and it automatically sets the created span as the _current_ span.
```rust
use sentry::integrations::tracing::SpanLayer;
@@ -54,6 +54,8 @@ fn main_span2() {
}
```
+Without a filter, `SpanLayer` captures spans at every level, including `DEBUG` and `TRACE`, so we recommend adding a level filter, as shown in the example above. `LevelFilter::INFO` is a sensible starting point for most applications.
+
## OpenTelemetry Integration
The Rust SDK offers an integration for the OpenTelemetry ecosystem.
From cd94cf74aa1c5db27648ad0d9a9386bd7860a95f Mon Sep 17 00:00:00 2001
From: "sentry-junior[bot]"
<264270552+sentry-junior[bot]@users.noreply.github.com>
Date: Wed, 28 Oct 2026 12:25:15 +0000
Subject: [PATCH 4/4] docs(rust): Simplify tracing logs and span layer examples
Drop the fmt layer from the logs example and comment the LogLayer
filter. Describe SpanLayer without tying it to tracing::instrument.
---
docs/platforms/rust/common/logs/index.mdx | 2 +-
.../tracing/instrumentation/automatic-instrumentation.mdx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/platforms/rust/common/logs/index.mdx b/docs/platforms/rust/common/logs/index.mdx
index 1096e677739dc..ec4fcc2e93bb0 100644
--- a/docs/platforms/rust/common/logs/index.mdx
+++ b/docs/platforms/rust/common/logs/index.mdx
@@ -83,7 +83,7 @@ fn main() {
);
tracing_subscriber::registry()
- .with(tracing_subscriber::fmt::layer())
+ // Capture INFO, WARN, and ERROR events as Sentry logs
.with(LogLayer::new().with_filter(LevelFilter::INFO))
.init();
diff --git a/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx b/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
index 72437bb98319b..b352f9aa7fab9 100644
--- a/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
+++ b/docs/platforms/rust/common/tracing/instrumentation/automatic-instrumentation.mdx
@@ -14,7 +14,7 @@ Capturing transactions requires that you first set
## `tracing` Integration
-The Rust SDK's [`SpanLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.SpanLayer.html) captures `tracing` spans as Sentry spans, so every function annotated with `#[tracing::instrument]` is tracked automatically.
+The Rust SDK's [`SpanLayer`](https://docs.rs/sentry-tracing/latest/sentry_tracing/struct.SpanLayer.html) captures `tracing` spans as Sentry spans.
The layer takes care of starting a new transaction or a new child span of an already running transaction, and it automatically sets the created span as the _current_ span.