Closed scefali closed 1 month ago
Assigning to @getsentry/support for routing ⏲️
Routing to @getsentry/product-owners-issues for triage ⏲️
Hey @scefali! (miss you on the team 🫶)
The event highlights get pre-populated with some defaults based on the project (like User.Email
) but other properties you added won't be highlighted dynamically. Anything in 'Tags' or 'Contexts' can be highlighted.
You'll need to manually add them by using the 'Edit' button just above the highlights. Going forward, those should appear at the top of every issue for the project! 👍
@leeandher miss you guys as well!
The only thing that's a bit annoying is that I don't think it registers these contexts as user tags because I have 0 users:
Does setting the user in Node behave differently than on the backend? Or is it because I set id
instead of userId
? Editing the event highlights made it appear a the top at least, nifty feature! Nice work on that btw
@scefali nice to see you here! Yeah I think it's because you need to want Sentry.setUser({ id: auth.userId, ... })
instead of setting userId
. According to the docs, it needs one of id
, username
, email
, or ip_address
to work the way you'd expect.
Yeah it's a bit obscure but context items aren't searchable the way tags are so you won't be able to query them. When ingesting events, Sentry will promote some context to searchable tags (e.g. user.id, brower.version, etc.) but the rest of the context will remain not searchable.
The setUser(...)
operation in the SDK is kind of an alias for setContext('user', ...)
so your custom user keys are not searchable. You'll have to use setTag
instead.
If you use id
instead of userId
though, that would probably get at least that ID promoted to a tag by default! Even if you'll have to do it manually for orgSlug
, orgRole
etc.
@malwilley @leeandher Thanks guys! I'm sure I'll be posting issues here and there these days :D
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
I am trying to set the user for an API route Next.js for an application. Following the instructions here.
Here is my code:
Expected Result
User information should show up in event highlights.
Actual Result
User information shows up in context instead:
Product Area
Issues
Link
https://builtrightco.sentry.io/issues/5486316096/?project=4507410872139776
DSN
No response
Version
No response