Is it possible to make the RUM agent use the id property, instead of the name property?

Hi

Is it possible to make the RUM agent use the id property, instead of the name property?

Hi @Casper_Thrane

I'm assuming you meant using the attribute id instead of the name attribute to compute the transaction name when the user clicks on a button. If not please expand your question to give more contexts if my assumption is wrong.

To give a transaction name when a element is clicked the RUM agent seeks for

  • the attribute data-transaction-name in the target element or one of its ancestors
  • the attribute name in the target element
  • If no value is found it falls back to the element tagName

So you may use data-transaction-name as a place to add the name you want for your transaction.

Ref: Supported Technologies | APM Real User Monitoring JavaScript Agent Reference [5.x] | Elastic

Cheers,
David