RUM: Multiple active transactions


We are using RUM service for monitoring request on our site, so we are creating a custom transaction for each call that we are doing to an external API. We have the following scenario:

Custom transaction #1 : started
Custom transaction #2 : started
Custom transaction #2 : ended
Custom transaction #1 : ended

As far as I understand, there can only be one active transaction, so when we start #2, the #1 it is closing and we are losing data.

Is there any way to allow that scenario?, keep multiple transactions, like a queue?


Hi @Daniel_Mariano,

Thanks for reaching out.

Currently, there can only be one active transaction at any given time in the RUM agent. The reason for this is that we want to capture global calls to XHR and fetch and currently we capture those as spans in the active transaction.

Would you please provide more detail about your use-case?
Do you want to create all the spans for the custom transaction manually as well?


Hi @Hamidreza ,

I am creating multiple custom transactions, one for each feature in my web app, for example:

Custom transaction #1 - Upload some file.
Custom transaction #2 - Delete some file.
Custom transaction #3 - Rename some file.

So... I want to keep them separate, so we can analize, time/errors/tags for each feature. The problem is that my requests are async, so the user can upload some file (#1) and meantime delete or rename other files. Please see below an example:

  1. The user upload some file (we are creating a custom transaction named 'UPLOAD_FILE' - this request can take a few minutes depending on the file size and we are taging file_name, file_id, file_size, etc ).

  2. While the upload is progress, the user delete other file (we create a custom transaction named 'DELETE_FILE', but the service is closing the 'UPLOAD_FILE' transaction before it finish. So here we are losing information from the 'UPLOAD_FILE' transaction.

  3. The 'DELETE_FILE' transactions ends, saving data ok.

  4. The 'UPLOAD_FILE' request ends, but nothing happends because we have already closed the transaction.

In case there was a custom transaction active, for example the UPLOAD_FILE, we could create spans for each action that takes place during that process, but this prevents us from analyzing the times of each functionality, so we want to keep each feature as a separate transaction.

We are not creating the spans manually, we let the service do it for us.

Please let me know if you think that we can model this in a different way.


Thanks for the detailed explanation @Daniel_Mariano,

I've created this issue to address creating multiple transactions .

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.