-
-
Notifications
You must be signed in to change notification settings - Fork 458
How to add spans to @service classes in Java spring boot? #2197
-
I want to enable sentry tracing via spans for my backend server which is written in Java Spring.
There is a class called ESService with an @service annotation. The @SentrySpan annotation has been added to this class but I am not seeing the perf times of the methods in this class in Sentry.
What do I need to do?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Spans are added to Transactions. Do you have a transaction happening? If that service is the entry point (like it's invoked by the framework or something) you could annotate with @SentryTransaction instead. Otherwise maybe you haven't setup performance yet? https://docs.sentry.io/platforms/java/guides/spring-boot/performance/
For incoming Web requests, the SDK automatically starts a transaction. So any @SentrySpan that happens in a request should automatically get appended to the it
Beta Was this translation helpful? Give feedback.