Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rum-core): add fallback to click transaction name #1452

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kareemaly
Copy link

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!

@cla-checker-service
Copy link

❌ Author of the following commits did not sign a Contributor Agreement:
f807b9c

Please, read and sign the above mentioned agreement if you want to contribute to this project

@devcorpio
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants