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

[User Feedback] Ability to tag feedback button instances #71254

Closed
ryan953 opened this issue May 21, 2024 · 0 comments · Fixed by getsentry/sentry-javascript#12197
Closed

[User Feedback] Ability to tag feedback button instances #71254

ryan953 opened this issue May 21, 2024 · 0 comments · Fixed by getsentry/sentry-javascript#12197
Assignees

Comments

@ryan953
Copy link
Member

ryan953 commented May 21, 2024

Q: If we have two feedback buttons sharing the same URL - are there any best practices for differentiating feedback coming from them? (i.e. let's say we have a button for grouping, and one for issue details)
what we're finding on issues is that just using url isn't granular enough for us, and we have enough volume that it can be very manual to sort through

the challenge is volume but also targeting....i.e. the use case is not a generic feedback button, but feature-specific ones

from slack https://sentry.slack.com/archives/C05J714QPRR/p1716306417928009
context: https://sentry.slack.com/archives/C04KZQBNQ2U/p1716306433600159?thread_ts=1716303774.260649&cid=C04KZQBNQ2U


The real problem here is that there's no way to call setTag() for a feedback. https://docs.sentry.io/platforms/javascript/enriching-events/tags/

This is a gap in the feedback api, and missing feature we should fix.

@ryan953 ryan953 changed the title [User Feedback] Ability to distinguish feedbacks from different buttons at the same url [User Feedback] Ability to tag feedback button instances May 23, 2024
@ryan953 ryan953 self-assigned this May 23, 2024
ryan953 added a commit to getsentry/sentry-javascript that referenced this issue Jun 17, 2024
…am (#12197)

We were missing the ability to set tags within feedback before, this
corrects it.

See getsentry/sentry-docs#10137 for the docs
update.

Now a developer can set `tags: {...}` anytime an options param is passed
into feedback. This includes:
- when we init the integration `feedbackIntegration({tags: {hello:
'world'}})`
- when attachTo is called: `feedback.attachTo(element, {tags: {hello:
'world'}})`
- when createWidget is called: `feedback.createWidget({tags: {hello:
'world'}})`
- when createForm is called: `feedback.createForm({tags: {hello:
'world'}})`

Users can also pass tags to `sendFeedback()` which is slightly nicer
than having to set them on scope first.
 - `Sentry.sendFeedback({tags: {hello: 'world'}})` 
- `captureFeedback()` is unaffected, keeping it closer in style to the
other `capture*()` methods.

I also took the chance to re-use related types in more places. Checkout
the first 2 commits on the branch to see those changes individually.

Fixes getsentry/sentry#71254
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 a pull request may close this issue.

1 participant