apm-agent-rum-js
apm-agent-rum-js copied to clipboard
feat(rum-core): add fallback to click transaction name
I came across a scenario in findCustomTransactionName, where it returns null
if it doesn't find a closest element matching the INTERACTIVE_SELECTOR
. In our frontend, we utilize clickable elements like images that are not wrapped in button
or a
tags, but they do have the data-transaction-name
attribute defined. However, the current implementation still leads to a Click - img
transaction name.
I noticed the current behavior is covered in unit tests which suggests it might be by design? If not, then I'm proposing a slight modification to the findCustomTransactionName
function to return target.dataset.transactionName
as a fallback when no closest matching element is found.
Looking forward to your feedback. Thank you!
❌ Author of the following commits did not sign a Contributor Agreement: f807b9c603a91bfff806e84d97ea3b25f29a5983
Please, read and sign the above mentioned agreement if you want to contribute to this project
Hi @kareemaly,
Thanks a lot for your contribution!
Currently, we have limited availability to review your PR - due to project priorities within the team - we'll let you know once we are ready to review it.
Thanks for your time,
Alberto
Hi @kareemaly,
just letting you know that we are fixing this in this PR: https://github.com/elastic/apm-agent-rum-js/pull/1511
Thanks again for your initiative
Alberto