RUM js agent - Failed transaction rate is "N/A" for different transaction types

Kibana version: 7.16.3

Elasticsearch version: 7.16.3

APM Server version: 7.16.3

APM Agent language and version: @elastic/apm-rum:5.12

Browser version: Chrome 110.0.5481.100

Hi all,
We have recently started using the RUM js client to monitor the performance of our application.
While analysing the data generated by the agent in Kibana, we noticed that the transactions of type: page-load, user-interaction and route-change always have the value "N/A". Further analysis has shown that for all spans ( span.type!=http) under these transactions, the field value event.outcome is set to unknown by the agent. This then also applies to the transaction above.

In the picture you can see such a transaction - here an http call (Span.Type=http) fails and the span gets the field value event.outcome=failure. However, the transaction has set the field value event.outcome=unknown.

This raises the following questions for us:

  1. should the field event.outcome=failure be set on the transaction in such a case (see above)?
  2. is the assumption correct that the RUM js agent does not set a value for the field event.outcome when dealing with RUM specific span - types? (e.g. img, script, longtasketc.) and therefore the Failed transaction rate is displayed as N/A in Kibana?

Thank you for a hint!

Many greetings,
Thilo

Hi @dacothe,

Thanks for raising and the detailed write up.

we noticed that the transactions of type: page-load , user-interaction and route-change always have the value "N/A"

This is kind of a tricky question, I will try to answer my best here. For the events of the above type, there is no such thing as successful or failed outcome as the web page would be fire load event in all cases. We know that the request from the user perspective has succeeded which is why we have the outcome has not been set and it defaults to unknown for all of the transcations like page-load, route-change, etc.

But for the HTTP related transaction, its a clear backend request and we can define the outcome based on the request being successful or failure.

  1. should the field event.outcome=failure be set on the transaction in such a case (see above)?

Setting outcome=failure for page-load transactions if any of the HTTP spans fails would look bad, reasons being

  • There can be N number of API calls that belong to a single page-load event. We dont know which ones are relevant and which ones are not.
  • Even third party API requests part of page-load also can impact the outcome of the transaction.

It would always be flaky, due to these reasons we have made the decision to not set the outcome for the user activity related transaction (ex: page-load, route-change) and do not want these events to be taken in to error rate calculation.

is the assumption correct that the RUM js agent does not set a value for the field event.outcome when dealing with RUM specific span - types?

Yes, browsers right now do not expose the status code for these type of resources(img, script. etc). It might be possible to set the outcome once the statusCode is exposed - Add response status codes for resources in Resource Timing API. · Issue #90 · w3c/resource-timing · GitHub

Thanks,
Vignesh

1 Like

Hello @vigneshshanmugam,

thank you very much for the very detailed explanation of the behaviour of the RumJS client - your explanations leave no question unanswered!

:ok_hand:

Kind regards,
Thilo

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