Skip to content

feat(docs): Apply new quick start template to Rust quick start guides - #19989

Open
sentry-junior[bot] wants to merge 3 commits into
masterfrom
docs/quickstart-template-rust
Open

sentry-junior[bot] wants to merge 3 commits into
masterfrom
docs/quickstart-template-rust

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Applies the quick start template from #19295 (Ember) to the Rust quick starts: the Rust root page and the Axum, Actix Web and tracing guides. All pages keep their single-column layout.

  • Removes the onboarding option checkboxes and ___PRODUCT_OPTION___ markers (Axum and tracing).
  • Configure names the features each guide sets up (Error Monitoring, Tracing, Logs, Application Metrics). The snippets include all options by default, and a note explains that unwanted options can be removed. The tracing guide's install includes the required tracing Cargo feature.
  • Logs (SDK 0.42.0+) and Application Metrics (SDK 0.48.0+) are enabled by default with default Cargo features. Send Logs notes that the logs feature must be added when default features are disabled.
  • Adds Send Logs (with links to the tracing and log crate integrations) and Send Application Metrics as their own steps, and simplifies Verify.
  • Rust root page: adds traces_sample_rate to the init snippet. The async main guidance and the Integrations section (including the debug_images warning) move under Configure. Verify is a single panic!, and the "More Information" links move to Next Steps.
  • Actix Web: keeps max_request_body_size in the snippet. Middleware ordering, capture_server_errors and start_transaction are explained in an "Instrument Actix Web" section under Configure. Verify is a single request to the failing example route.

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

via shannon.anahata.

--

View Junior Session [Sentry]

Co-Authored-By: Shannon Anahata <shannon.anahata@sentry.io>
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Nov 13, 2026 6:59pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Nov 13, 2026 6:59pm UTC

Request Review

@codeowner-assignment
codeowner-assignment Bot requested a review from a team October 15, 2026 00:02
@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Oct 15, 2026
@cursor

cursor Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The plan checks page loads on the two rewritten guides, client errors on those pages, and sibling guide loads. An issue escalates when those pages stop loading or new client errors appear.

Services: sentry-docs.

Mention @change-monitor in a comment to update the plan.

Plan

What changed

Readers of the Axum and tracing quick start pages now see the new template. The pages no longer show onboarding option checkboxes. The snippets always include tracing. New sections cover logs and application metrics.
This change ships when sentry-docs deploys. The develop-docs site does not serve these pages.

Risk

A render failure makes those two pages fail in the browser. New code blocks and the metrics badge can raise client errors. Sibling rust guides share the same static generation path. A bad build can drop other rust routes. Users can no longer hide tracing with the old checkboxes.

Intended effect

The new headings do not appear in telemetry. Use sampled page loads of the two guide URLs as the proxy. The effect is absent if those URLs drop to zero loads while the rust root page still loads. Traces are sampled at 30 percent. Transaction name is /:path*?. Slice by exact url.full.

Signal Baseline Window Rule Source
Sampled pageload and navigation count for https://docs.sentry.io/platforms/rust/guides/axum/ and https://docs.sentry.io/platforms/rust/guides/tracing/ Combined 10 in 24h and 14 in 48h. Axum 7 and tracing 3 in 24h. Axum 7 and tracing 7 in 48h. Seven-day totals axum 20 and tracing 27. 2026-10-14T00:03:00Z to 2026-10-15T00:03:00Z, and prior day 2026-10-13T00:03:00Z to 2026-10-14T00:03:00Z Hold in the 4-10 band per 24h. Absent if the combined count falls to 0 while rust root still loads. Sentry org sentry project docs. Query span.op:[pageload,navigation] environment:production url.full:["https://docs.sentry.io/platforms/rust/guides/axum/","https://docs.sentry.io/platforms/rust/guides/tracing/"] with count() by url.full.

Regression watch

A broken page shows client errors first. Then sampled loads on these URLs fall. Sibling rust routes share generation. Watch the rust root page so a tree-wide drop is visible. Volume is lumpy. Pair every error count with the sampled load count on the same URLs.

Signal Baseline Window Rule Source
Client error count on the two guide URLs 0 in 24h and 0 in 48h. 2 in 7d, all title Event: Event \Event` (type=error) captured as promise rejection`. 2026-10-13T00:03:00Z to 2026-10-15T00:03:00Z Hold in 0-2 per 24h. Escalate if errors rise while sampled loads still run. Sentry org sentry project docs. Query environment:production http.url:["https://docs.sentry.io/platforms/rust/guides/axum/","https://docs.sentry.io/platforms/rust/guides/tracing/"] with count().
p95 pageload and navigation duration on the two guide URLs 24h axum 4806.5ms and tracing 330.2ms. 48h axum 4806.5ms and tracing 3460.7ms. 7d axum 4806.5ms and tracing 6602.8ms. 2026-10-08T00:03:00Z to 2026-10-15T00:03:00Z Hold in the measured 330-6603ms range. Escalate if either URL stays above 6603ms with at least 7 samples. Same span query as intended effect, with p95(span.duration) by url.full.
Sampled pageload and navigation count for rust root https://docs.sentry.io/platforms/rust/ 10 in 24h. 130 in 7d. p95 4259ms in 24h and 5525ms in 7d. Actix Web had 0 in 24h and 10 in 7d. 2026-10-14T00:03:00Z to 2026-10-15T00:03:00Z and 2026-10-08T00:03:00Z to 2026-10-15T00:03:00Z Hold rust root near 10-19 sampled loads per 24h. Escalate if rust root falls to 0. Sentry org sentry project docs. Query span.op:[pageload,navigation] environment:production url.full:"https://docs.sentry.io/platforms/rust/" with count().
Sampled pageload and navigation count for all /platforms/rust URLs 140 in 24h. p95 3826.7ms. Client errors on http.url:*/platforms/rust/* were 0 in 24h and 128 in 7d, same promise-rejection title. 2026-10-14T00:03:00Z to 2026-10-15T00:03:00Z Hold family loads near 140 per 24h. Escalate if family errors appear on the two rewritten URLs after a 48h zero. Sentry org sentry project docs. Query span.op:[pageload,navigation] environment:production url.full:*/platforms/rust* with count() and p95(span.duration).

If client errors rise, inspect the promise-rejection title on these two URLs first. Then check MDX render of FeatureBadge and the new code fences.

Not observable

The new headings and the removed checkboxes have no content signal. A p75 LCP query on these two URLs returned no rows. Whether tracing stays visible in the snippet is not measured.

…k start guides

Co-Authored-By: Shannon Anahata <shannon.anahata@sentry.io>
@sentry-junior sentry-junior Bot mentioned this pull request Oct 28, 2026
1 of 6 tasks
szokeasaurusrex added a commit that referenced this pull request Oct 28, 2026
## DESCRIBE YOUR PR

[sentry-rust
0.49.4](https://github.com/getsentry/sentry-rust/releases/tag/0.49.4)
deprecated `sentry::integrations::tracing::layer()`, `SentryLayer`, and
`EventFilter`. It replaced them with independently selectable layers,
and recommends `SpanLayer` and `LogLayer` for most applications
([getsentry/sentry-rust#1342](getsentry/sentry-rust#1342)).
The Rust docs still showed only the deprecated API.

- **`tracing` guide**: The example registers `SpanLayer` and `LogLayer`
with `LevelFilter::INFO`. I removed the product option toggles because
the example no longer depends on them. The page links the API docs for
each layer and mentions `ErrorLayer`/`BreadcrumbLayer` as legacy
options. It also has a deprecation warning that links the migration
guide for the latest 0.49.x release (`~0.49`). The Verify section now
covers traces and logs.
- **Logs**: Uses `LogLayer` with `LevelFilter::INFO`, and explains in
prose why filtering is recommended.
- **Automatic instrumentation**: Uses `SpanLayer` with
`LevelFilter::INFO`.

I compiled and ran the new snippets against `sentry` 0.49.4, with no
deprecation warnings. Heads-up: #19989 also edits the `tracing` guide,
so one of the two PRs will need a rebase.

Resolves #20289

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

## PRE-MERGE CHECKLIST

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0CAA8NNBE3%3A1793187164.433919 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CAA8NNBE3%3A1793187164.433919)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CAA8NNBE3%3A1793187164.433919/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>

@szokeasaurusrex szokeasaurusrex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes! I agree some of the content and wording here could use some updating.

That said, I think in some areas, this could be made a bit more concise and less repetitive. I also don't think it is such a good idea to repeat instructions for manual instrumentation of logs and metrics on every page; I would rather we keep that documentation on the pages for those features and only link to those pages if truly necessary.

Comment on lines +23 to +24
**Error Monitoring** starts working as soon as you call `sentry::init()`. **Logs** are supported in Rust SDK 0.42.0 and later and enabled by default. **Application Metrics** are available in Rust SDK 0.48.0 and later; both are covered in [Send Logs](#send-logs) and [Send Application Metrics](#send-application-metrics-).
This guide also enables **Tracing**.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need to mention all of the different telemetry types here. It could even confuse users, as we shouldn't be capturing logs and metrics without manual instrumentation

**Error Monitoring** starts working as soon as you call `sentry::init()`. **Logs** are supported in Rust SDK 0.42.0 and later and enabled by default. **Application Metrics** are available in Rust SDK 0.48.0 and later; both are covered in [Send Logs](#send-logs) and [Send Application Metrics](#send-application-metrics-).
This guide also enables **Tracing**.

Initialize Sentry before starting the async runtime, then add the Sentry middleware to your Actix Web app. The example route returns an error so you can verify the setup in the next step.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need this, when we already have the warning below.

Comment on lines +34 to +40
The snippet also turns on:

- Tracing: via <PlatformLink to="/configuration/options/#traces_sample_rate">`traces_sample_rate`</PlatformLink> and the middleware's `start_transaction(true)`.
- User IP and HTTP header collection: via <PlatformLink to="/configuration/options/#send_default_pii">`send_default_pii`</PlatformLink>. Review the data your app sends before enabling this in production.
- HTTP request body collection: via <PlatformLink to="/configuration/options/#max_request_body_size">`max_request_body_size`</PlatformLink>.

Don't need a feature? Remove its options from the snippet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would integrate this information into the code comments in the example, otherwise we are duplicating information

Suggested change
The snippet also turns on:
- Tracing: via <PlatformLink to="/configuration/options/#traces_sample_rate">`traces_sample_rate`</PlatformLink> and the middleware's `start_transaction(true)`.
- User IP and HTTP header collection: via <PlatformLink to="/configuration/options/#send_default_pii">`send_default_pii`</PlatformLink>. Review the data your app sends before enabling this in production.
- HTTP request body collection: via <PlatformLink to="/configuration/options/#max_request_body_size">`max_request_body_size`</PlatformLink>.
Don't need a feature? Remove its options from the snippet.

.traces_sample_rate(1.0)
// Capture user IPs and potentially sensitive headers when using HTTP server integrations
// see https://docs.sentry.io/platforms/rust/data-management/data-collected for more info
// Capture user IPs and potentially sensitive headers when using HTTP server integrations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Companion to previous comment

Suggested change
// Capture user IPs and potentially sensitive headers when using HTTP server integrations.
// Capture user IPs and potentially sensitive headers when using HTTP server integrations.
// Review the data your app sends before enabling this option in production.

Comment on lines +88 to +92
### Instrument Actix Web

The snippet above sets up a service that always fails, so you can test that everything is working as soon as you set it up.
The Sentry middleware provides correct request and trace association for any captured errors or panics, so it should be the first to process the request. That means it should be the last in your chain of `wrap` calls.

Send a request to the application. The response error will be captured by Sentry.
`capture_server_errors(true)` reports server errors returned by your services to Sentry, and `start_transaction(true)` starts a transaction for each request.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it confusing that this comes after the code sample. It reads as if some additional config is required beyond the sample, but in fact, thecae is already contained there.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same comments from the other guides also apply here.

Also, this PR should be rebased on the latest version of the docs, as this guide has been significantly reworked following a redesign of the tracing integration.

Comment thread docs/platforms/rust/index.mdx Outdated
Comment on lines 34 to 65
**Error Monitoring** starts working as soon as you call `sentry::init()`. **Logs** are supported in Rust SDK 0.42.0 and later and enabled by default. **Application Metrics** are available in Rust SDK 0.48.0 and later; both are covered in [Send Logs](#send-logs) and [Send Application Metrics](#send-application-metrics-).
This guide also enables **Tracing**.

The `sentry::init` function returns a guard that when dropped, will flush Events that weren't yet sent to Sentry. It has a two-second deadline, so application shutdown may be slightly delayed as a result. Be sure to keep the guard or you won't be able to send events.
Call `sentry::init()` as early as possible in your `main` function. It starts a Sentry client with a default set of integrations, such as panic reporting, and binds it to the current Hub.

`sentry::init()` returns a guard that flushes events that haven't been sent yet when it's dropped. The flush has a two-second deadline, so application shutdown may be slightly delayed. Keep the guard alive for as long as your app runs, or the SDK won't be able to send events.

The snippet also turns on:

- Tracing: via <PlatformLink to="/configuration/options/#traces_sample_rate">`traces_sample_rate`</PlatformLink>.
- User IP and HTTP header collection: via <PlatformLink to="/configuration/options/#send_default_pii">`send_default_pii`</PlatformLink>. Review the data your app sends before enabling this in production.

Don't need a feature? Remove its options from the snippet.

```rust {filename:main.rs}
let _guard = sentry::init(
sentry::ClientOptions::new()
.dsn("___PUBLIC_DSN___")
.maybe_release(sentry::release_name!())
// Capture user IPs and potentially sensitive headers when using HTTP server integrations
// see https://docs.sentry.io/platforms/rust/data-management/data-collected for more info
.send_default_pii(true),
);
fn main() {
let _guard = sentry::init(
sentry::ClientOptions::new()
.dsn("___PUBLIC_DSN___")
.maybe_release(sentry::release_name!())
// Enables Tracing.
// Set to 1.0 to capture 100% of spans for tracing.
// We recommend reducing this value in production.
.traces_sample_rate(1.0)
// Capture user IPs and potentially sensitive headers when using HTTP server integrations.
// See https://docs.sentry.io/platforms/rust/data-management/data-collected/ for more info.
.send_default_pii(true),
);

// implementation of main
}
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comments here as from actix

Comment thread docs/platforms/rust/index.mdx Outdated
Comment on lines +122 to +146
## Send Logs

Use Sentry's `logger_*` macros to send logs at different levels. Logs are supported in Rust SDK 0.42.0 and later and enabled by default unless you compile the SDK without default features. In that case, enable the `logs` feature on `sentry`. For logging through the `tracing` or `log` crates, see the <PlatformLink to="/logs/#tracing-integration">`tracing` integration</PlatformLink> and <PlatformLink to="/logs/#log-integration">`log` integration</PlatformLink> guides.

See <PlatformLink to="/logs/">Set Up Logs</PlatformLink> for all available logging methods and configuration options.

```rust
use sentry::logger_info;

logger_info!("Order processed");
```

## Send Application Metrics <FeatureBadge type="new" />

- [API Docs](https://docs.rs/sentry)
- [Crates.io page](https://crates.io/crates/sentry)
- [Bug Tracker](https://github.com/getsentry/sentry-rust/issues)
- [GitHub Project](https://github.com/getsentry/sentry-rust)
Use `sentry::metrics` to send counters, gauges, and distributions. Metrics require Rust SDK 0.48.0 or later and are enabled by default in the `sentry` crate.

See <PlatformLink to="/metrics/">Set Up Metrics</PlatformLink> for all available metric types and configuration options.

```rust
use sentry::metrics;

metrics::counter("checkout.failed", 1).capture();
metrics::gauge("active_connections", 42).capture();
metrics::distribution("api_latency", 187.0).capture();
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, not sure if we need to call these out specifically on the main page. We have clear guides for logs and metrics on subpages.

Comment thread docs/platforms/rust/index.mdx Outdated
panic!("Everything is on fire!");
```

### View Captured Data in Sentry

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### View Captured Data in Sentry

Not sure we need this heading, given how short the section is

Comment thread docs/platforms/rust/index.mdx Outdated
Comment on lines +163 to +168
At this point, you should have integrated Sentry into your Rust application. Here's what to explore next:

- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup.
- Learn how to [manually capture errors](/platforms/rust/usage/).
- Instrument more operations with [custom tracing](/platforms/rust/tracing/instrumentation/custom-instrumentation/).
- Browse the [API docs](https://docs.rs/sentry), the [crates.io page](https://crates.io/crates/sentry), and the [GitHub project](https://github.com/getsentry/sentry-rust). Report bugs in the [issue tracker](https://github.com/getsentry/sentry-rust/issues).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this section, we might want to also mention that users may wish to enable integrations, as integrations don't get enabled by default in the Rust SDK. I would highlight this before highlighting manual instrumentation.

Remove duplicated telemetry examples and keep verification next to setup code.

Retain the redesigned tracing integration while incorporating current master.
@sfanahata
sfanahata requested a review from a team as a code owner November 13, 2026 18:51
@cursor

cursor Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

This PR is too large for Bugbot to review. It changes 41,288 lines and 3,309,497 characters. Split the change into smaller pull requests to get a review.

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — a5cbacd2 Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant