Skip to content
Merged
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
5 changes: 5 additions & 0 deletions skills/sentry-flutter-sdk/references/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ MaterialApp(
ignoreRoutes: ['/splash', '/loading'],
// Use route name as the Sentry transaction name (default: false)
setRouteNameAsTransaction: false,
// Generate a fresh trace on each push/pop/replace (default: false).
// Changed from true → false in sentry_flutter 9.19.0.
// Set to true to restore the previous opt-out behavior.
enableNewTraceOnNavigation: false,
),
],
routes: {
Expand Down Expand Up @@ -465,6 +469,7 @@ await SentryFlutter.init(
|-------|----------|
| No transactions in Sentry | Confirm `tracesSampleRate > 0`; set to `1.0` to see all during debugging |
| Navigation not tracked | Add `SentryNavigatorObserver()` to `navigatorObservers`; name all routes |
| Traces not being connected across navigations | `enableNewTraceOnNavigation` defaults to `false` since 9.19.0 — set it to `true` to generate a fresh trace on each navigation event |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The troubleshooting guide for enableNewTraceOnNavigation has a misleading problem description that contradicts the suggested solution.
Severity: LOW

Suggested Fix

Update the problem description in the troubleshooting table to be more accurate. Instead of "Traces not being connected across navigations", use a clearer phrase like "Navigation events not generating separate traces" or "All navigation appearing in a single trace" to accurately reflect the issue that setting enableNewTraceOnNavigation: true resolves.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills/sentry-flutter-sdk/references/tracing.md#L472

Potential issue: The troubleshooting documentation for `enableNewTraceOnNavigation`
contains a logical contradiction. The problem is described as "Traces not being
connected across navigations", which implies traces are fragmented. However, the
suggested solution is to set `enableNewTraceOnNavigation: true`, which is the setting
that explicitly creates a new, separate trace for each navigation event. This action
would exacerbate, not fix, the problem as described. While the intended audience (users
upgrading from a previous version) might understand the goal, the problem description is
misleading and will likely confuse users unfamiliar with the history of this setting.

Did we get this right? 👍 / 👎 to inform future reviews.

| TTID/TTFD spans missing | SDK ≥ 9.1.0 required; routes must have names |
| TTFD never reports | Call `SentryFlutter.currentDisplay()?.reportFullyDisplayed()` or use `SentryDisplayWidget` |
| GoRouter tabs not tracked | Known Flutter limitation — tab transitions don't trigger standard navigator callbacks |
Expand Down
Loading