getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.97k stars 1.57k forks source link

Sentry.configureScope + setUser doesn't send any data #2405

Closed AndreyKomin closed 4 years ago

AndreyKomin commented 4 years ago

Package + Version

Version:

5.11.2

Description

Use it like here: image

Result: image

AndreyKomin commented 4 years ago

But that works for setTag:

  Sentry.configureScope(scope => {
    scope.setTag('User ID', userId)
  })

image

kamilogorek commented 4 years ago

You cannot call configureScope before init.

AndreyKomin commented 4 years ago

@kamilogorek Thanks!

dartess commented 2 years ago

This is an excellent issue.

@kamilogorek do you think it's possible to add warning if the developer tries to call configureScope before init?

kamilogorek commented 2 years ago

Definitely not in this major version, as it'd be expectations breaking change. However, if you think it'd be a useful thing, feel free to open a new issue detailing your usecase.