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): enhance user transaction name obtaining #1390

Merged
merged 7 commits into from Jul 12, 2023

Conversation

devcorpio
Copy link
Contributor

@devcorpio devcorpio commented Jul 10, 2023

Related to #1286

Summary

We have improved the user-interaction transaction name obtaining. From now on, if a user performs click on an element from a nested HTML structure like this:

<button data-transaction-name="my transaction name">
  <span>Some text</span>
  <svg>button icon...</svg>
</button>

The users will always get Click - my transaction name rather than Click - span or Click - svg

For more details see the issue

Important:

The agent will keep applying the older "algorithm" in browsers not supporting the closest method. E.g. IE11

In addition, this will work if the target is inside a button or link - the ones we define as interactive selectors. See the associated tests in case you need more context

@devcorpio devcorpio linked an issue Jul 10, 2023 that may be closed by this pull request
@devcorpio devcorpio marked this pull request as ready for review July 10, 2023 16:18
Signed-off-by: Adrien Mannocci <adrien.mannocci@elastic.co>
dev-utils/test-config.js Outdated Show resolved Hide resolved
@devcorpio devcorpio force-pushed the user-interaction-improvement branch from d45cd7b to 20127f2 Compare July 11, 2023 16:53
Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@devcorpio devcorpio force-pushed the user-interaction-improvement branch from 42c4c63 to 3b0dc7b Compare July 11, 2023 17:38
@devcorpio devcorpio merged commit 1144b9f into main Jul 12, 2023
25 checks passed
@devcorpio devcorpio deleted the user-interaction-improvement branch July 12, 2023 14:51
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.

improve naming strategy for user-interaction transactions
3 participants