-
-
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
spring-boot/record-user page shoud mention that SentryUserProvider works only in web-app mode #5294
Comments
Another option is to implement SentryUserProvider registration in all modes, but it is a not "docs" issue, i guess. |
Routing to @getsentry/team-mobile for triage. ⏲️ |
Thanks for opening the issue @nixel2007. @adinauer should be able to help you out during this week. |
hello @philipphofmann! I've already solved my task with custom bean with "conditional on bean + depends on": https://github.com/1c-syntax/bsl-language-server/blob/develop/src/main/java/com/github/_1c_syntax/bsl/languageserver/aop/sentry/SentryScopeConfigurer.java#L42-L59 Just want to highlight this problem in docs |
@nixel2007 thank you for reporting this.
There used to be an We have this note on the docs (see https://docs.sentry.io/platforms/java/guides/spring-boot/record-user/):
Maybe we should move the record user page into https://docs.sentry.io/platforms/java/guides/spring-boot/enriching-events/identify-user/ |
This block looks like it applies to "auto" mode. Like "if you use spring mvc, you'll get this shiny thing out of the box. But you always can define custom user info provider with that interface". My bad, I know, but it is how i've read it for the first time. |
Status changed based on the above. Please let me know if it should be updated to something else! |
Routing to @getsentry/product-owners-sdks-web-backend for triage ⏲️ |
Core or SDK?
Platform/SDK
Which part? Which one?
Spring boot
Description
https://docs.sentry.io/platforms/java/guides/spring-boot/record-user page states that you could use SentryUserProvider bean for User custimization. But there is no information that this bean condinionaly loads only in web application mode - the only place where SentryUserProvider is used is the SentryWebMvcConfiguration with @ConditionalOnWebApplication.
I have a console spring boot app (WebEnvironment.NONE) and spend some time to figure it out :)
Suggested Solution
Add a note about ConditionalOnWebApplication/web app mode and provide a link to general doc https://docs.sentry.io/platforms/java/guides/spring-boot/enriching-events/identify-user/
The text was updated successfully, but these errors were encountered: