-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(browser): add interactionClassName for tracing interaction #7514
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hckhanh thanks for opening this PR!
I haven't been involved much in interaction transactions but I generally like the idea of having a simple way of deciding which elements should start a transaction and which shouldn't.
We do a similar thing for Session Replay, where users can apply classes or attributes to mask certain elements.
I'm gonna tag @k-fish as he and the performance team are experimenting with this feature for opinions.
If we go forward with this, we might provide a sensible default class name so that users don't have to define one on their own.
Hi @hckhanh 👋 For interaction transactions, I'd like to err towards the side of automatic tracing, since I don't think it would be a good experience for most users to have to configure a list of accepted class names. It would be better if we could have a list of classes that are excluded, or have a predefined exclusion class which you can put on your elements if you don't want them to be able to trigger interactions. Keep in mind that this is an experimental feature and still very early in development, so I don't recommend using it just yet 😄. I will be introducing guard rails in the future that will prevent useless interaction transactions from being sent and eating up transaction quota, and there will also be more configuration options available. If you still want to try out this feature but only have it work for specific classNames, here's what I recommend instead: When you initialize Sentry in your code, configure a tracesSampler function, and in here you can determine whether the transaction should be sent or not. On these UI transactions, we store |
Hi @0Calories, that is what i need for. Tracking user interactions is really meaningful for SPA apps. |
Given this is being already addressed going to close this PR for now. @hckhanh thanks again for opening a PR, please reach out if you have any other feedback! |
hi @0Calories, I cannot see any |
Hi @hckhanh , you're right sorry about that! It seems you can't access span data from Unfortunately you won't be able to set a sampling rate here, but you can return Here's a recent example of me using it which should help you find what you're looking for: |
Hi Sentry team, As I mentioned in #7513 I wonder if this is a good idea if we have a class name to detect whether the click interaction should be traced or not.
interaction transaction will be recorded for the element has specific class name, Ex: