Skip to content

Conversation

@david-luna
Copy link
Member

@david-luna david-luna commented Dec 2, 2025

The route change transaction is a type of transaction that can be interesting eve if it does not contain spans. Can be used to track the journey of the users across the instrumented web application. Is specifically useful for single page applications (SPA) where the URL can change without performing any HTTP request (hence no spans) because of the app caching data or because there is no need to fetch data.

The change introduces a new flag in configuration named sendAllRouteChanges which defaults to false keeping the current behavior. Apps that wants to record all transactions of type route-change can set this config to true.

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

🔍 Preview links for changed docs

Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

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

Rest looks good.

* **Type:** Boolean
* **Default:** `false`

This allows the agent to send all `route-change` transactions regardless if it contains any spans or not. This is usefull if you want to keep track of all the navigations your app is doing.
Copy link
Member

Choose a reason for hiding this comment

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

Need to call out how sampling plays a role in here as well.

::::


### `sendAllRouteChanges` [send-all-route-changes]
Copy link
Member

Choose a reason for hiding this comment

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

There might be a request to add the same logic to user-click events as well, lets make this flag generic? reportAllTraces something along these lines ?

Copy link
Member Author

Choose a reason for hiding this comment

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

At 1st I thought maybe to filter by transaction type. I don't have a strong opinion. Do we want a single or more fine grained control?

Copy link
Member Author

Choose a reason for hiding this comment

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

My suggestion is recordEmptyTransactions. Empty meaning with no spans. WDYT?



### `sendAllRouteChanges` [send-all-route-changes]
### `recordEmptyTransactions` [record-empty-transactions]
Copy link
Member

Choose a reason for hiding this comment

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

nit: reportTransactionsWithoutSpans? - fine with Empty as well. Just provided as a suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants