We want to use custom transactions for client side navigations in a single page application, as suggested by the documentation. However, we found that the RUM agent is already creating automatically transactions for route changes (transaction.type = "route-change").
As the RUM agent don't support to have multiple open transactions simultaneously, our custom transaction is automatically closed when the agent creates the "route-change" transaction automatically.
Is there any way to disable the automatic monitoring of the route changes events?
Currently, it's not possible to disable the automatic instrumentations we have this issue to address this.
Would you please provide more detail about your use-case?
Would it work in your case, if the route-change transaction used the custom transaction you've created and only extended/renamed it?
There are three reasons why that automatic instrumentation is not enough for us, and why we thought that creating custom transactions could solve our problem:
In our application, the navigation performs some tasks before actually try to change the browser url (history.pushState) which is when the automatic instrumentation starts the 'route-change' transaction. This tasks do some requests to our backends that we want to include as spans in the 'navigation' transaction.
On the other hand, the automatic 'route-change' transaction is ended before when we consider the navigation has finished, hence not reporting some requests and reporting a shorter duration
We as well want to customise the transaction name; 'route-change' transactions are reported with 'Unknown' in name because we don't update the browser title.
If I understood correctly, from what I read in the issue, I don't think that approach fit our particular needs.
Removing the automatic spans capturing for 'manual mode' transactions stop us from using that 'manual mode' for for client navigations transactions, since we are mostly interested in those spans. On the other hand, if we use the 'automatic mode', we'll have the same problems since the 'route-change' transaction will 'kill' our custom transaction.
It would be possible to just add a setting flag to enable/disable automatic 'route-change' instrumentation?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.