Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.50.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
scope.setUser({
id: 'test',
email: '[email protected]'
})
await SentrySDK.startSpan(
{
name: ctx.routeKey || 'unknown',
op: 'http.server',
scope,
},
async () => {
await next()
}
)
https://github.com/RomainLanz/sentry/blob/v0.2.0/src/middleware.ts
Steps to Reproduce
I am using AdonisJS v6 framework with the Sentry integration rlanz/sentry v0.2.0.
It works well, except for one single issue.
On the Performance Back-end dashboard, I see no count of Users and no value for User Misery.
First I thought there is some issue with setting the user on the scope after starting the span as you can see in the section Assigning User Context. But even if I call setUser directly on the scope before the startSpan function is called with the scope passed to it as a parameter, as you can see in the reproduction example, the user is still never sent in the data of the transaction. When error happens on the scope and the exception is captured, the user is there and I expected the same will apply to the transactions.
Expected Result
User will be included in Transaction event data and Performance dashboard will show count of Users and User Misery value.
Actual Result
User is not included in Transaction event data and Performance dashboard shows count of Users as 0 and no value for User Misery.
Metadata
Metadata
Assignees
Type
Projects
Status