-
Hello Team. Currently, I install the sentry on my project which use the Spring webflux. I found the guide to record user information(https://docs.sentry.io/platforms/java/guides/spring-boot/record-user/?original_referrer=https%3A%2F%2Fwww.google.com%2F) but it doesn't work on spring webflux. please help. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @sleep-dev, unfortunately You could add a custom Alternatively you should also be able to modify the current Does that help? |
Beta Was this translation helpful? Give feedback.
Hello @sleep-dev, unfortunately
SentryUserProvider
is only for Spring WebMVC.You could add a custom
EventProcessor
or usebeforeSend
to set user info before an event is sent to Sentry.Alternatively you should also be able to modify the current
Scope
and add theUser
using aWebFilter
. You just need to make sure you set the right order so it goes afterSentryWebTracingFilter
. You may need to retrieve the currentHub
fromServerWebExchange
(exchange.getAttributes().getOrDefault(SENTRY_HUB_KEY, null);
) depending on your version of Spring (Boot) and availability ofThreadLocalAccessor
. You may find this comment helpful.Does that help?