Custom transaction names with RUM

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text :slight_smile:

Kibana version:

Elasticsearch version:

APM Server version:

APM Agent language and version:
RUM 4.2

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I have an angular based UI and am using typescript. I called init on apm and got some traces to show up in Kibana. I wanted to have my transactions have names other than Unknown so I tried to follow I tried it by adding the pathname split and setting the pageLoadTransactionName to the pageName. I tried setting the pageLoadTransactionName as part of the config that is passed to init. The first page to load has a transaction name of '/'. All subsequent transaction names are "Unknown".

How can I have the transaction names be set to a piece of the url path?

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):


Apologies for the delay in responding. The config pageLoadTransactionName only works for the first transaction which is of type page-load and does not work for subsequent transactions since they belong to type route-change.

What you can do right now is to use out Events API (undocumented right now -, You can listen for these events and change the transaction names based on location path.

apm.observe('transaction:end', (tr) => {
  if ( === 'Unknown') { = window.location.pathname

We are also working on Angular Integration which would make it easier to see the transaction names setting properly to the route names. You can track it here

Any feedback would be appreciated, Also let us know if you have any questions.


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