Skip to content

feat(rum-core): allow sending transactions with no spans using config#1665

Merged
david-luna merged 5 commits intomainfrom
dluna-feat-allow-no-span-transactions
Dec 4, 2025
Merged

feat(rum-core): allow sending transactions with no spans using config#1665
david-luna merged 5 commits intomainfrom
dluna-feat-allow-no-span-transactions

Conversation

@david-luna
Copy link
Copy Markdown
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.

UPDATE: changed the config options to allow all transactions without spans.

The change introduces a new flag in configuration named reportTransactionsWithoutSpans which defaults to false keeping the current behavior. Apps that wants to record all transactions regardless if they have spans or not can set this config to true.

@github-actions
Copy link
Copy Markdown

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
Copy Markdown

github-actions Bot commented Dec 2, 2025

🔍 Preview links for changed docs

Copy link
Copy Markdown
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.

Comment thread docs/reference/configuration.md Outdated
* **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
Copy Markdown
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.

Comment thread docs/reference/configuration.md Outdated
::::


### `sendAllRouteChanges` [send-all-route-changes]
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.

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
Copy Markdown
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
Copy Markdown
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?

Comment thread docs/reference/configuration.md Outdated


### `sendAllRouteChanges` [send-all-route-changes]
### `recordEmptyTransactions` [record-empty-transactions]
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.

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

Copy link
Copy Markdown
Member Author

@david-luna david-luna Dec 4, 2025

Choose a reason for hiding this comment

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

commit a4c2fca

@david-luna david-luna changed the title feat(rum-core): allow sending route-change transactions with no spans via config feat(rum-core): allow sending transactions with no spans using config Dec 4, 2025
Copy link
Copy Markdown
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.

LGTM thank you

@david-luna david-luna merged commit a5d88c9 into main Dec 4, 2025
21 checks passed
@david-luna david-luna deleted the dluna-feat-allow-no-span-transactions branch December 4, 2025 20:05
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.

2 participants