File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
sentry-spring/src/main/java/io/sentry/spring Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 33import com .jakewharton .nopen .annotation .Open ;
44import io .sentry .IContinuousProfiler ;
55import io .sentry .IProfileConverter ;
6- import io .sentry .NoOpContinuousProfiler ;
7- import io .sentry .NoOpProfileConverter ;
86import io .sentry .Sentry ;
97import io .sentry .SentryOptions ;
108import io .sentry .util .InitUtil ;
@@ -26,25 +24,23 @@ public class SentryProfilerConfiguration {
2624 @ ConditionalOnMissingBean (name = "sentryOpenTelemetryProfilerConfiguration" )
2725 public IContinuousProfiler sentryOpenTelemetryProfilerConfiguration () {
2826 SentryOptions options = Sentry .getGlobalScope ().getOptions ();
29- IContinuousProfiler profiler = NoOpContinuousProfiler .getInstance ();
3027
3128 if (Sentry .isEnabled ()) {
3229 return InitUtil .initializeProfiler (options );
3330 } else {
34- return profiler ;
31+ return options . getContinuousProfiler () ;
3532 }
3633 }
3734
3835 @ Bean
3936 @ ConditionalOnMissingBean (name = "sentryOpenTelemetryProfilerConverterConfiguration" )
4037 public IProfileConverter sentryOpenTelemetryProfilerConverterConfiguration () {
4138 SentryOptions options = Sentry .getGlobalScope ().getOptions ();
42- IProfileConverter converter = NoOpProfileConverter .getInstance ();
4339
4440 if (Sentry .isEnabled ()) {
4541 return InitUtil .initializeProfileConverter (options );
4642 } else {
47- return converter ;
43+ return options . getProfilerConverter () ;
4844 }
4945 }
5046}
You can’t perform that action at this time.
0 commit comments