55
66package io .opentelemetry .contrib .stacktrace ;
77
8+ import static java .util .logging .Level .FINE ;
9+ import static java .util .logging .Level .SEVERE ;
10+
811import com .google .auto .service .AutoService ;
912import io .opentelemetry .sdk .autoconfigure .spi .AutoConfigurationCustomizer ;
1013import io .opentelemetry .sdk .autoconfigure .spi .AutoConfigurationCustomizerProvider ;
1417import java .lang .reflect .InvocationTargetException ;
1518import java .time .Duration ;
1619import java .util .function .Predicate ;
17- import java .util .logging .Level ;
1820import java .util .logging .Logger ;
1921import javax .annotation .Nullable ;
2022
2123@ AutoService (AutoConfigurationCustomizerProvider .class )
22- public class StackTraceAutoConfig implements AutoConfigurationCustomizerProvider {
24+ public final class StackTraceAutoConfig implements AutoConfigurationCustomizerProvider {
2325
2426 private static final Logger log = Logger .getLogger (StackTraceAutoConfig .class .getName ());
2527
@@ -50,7 +52,7 @@ static long getMinDuration(ConfigProperties properties) {
5052 log .fine ("Stack traces capture is disabled" );
5153 } else {
5254 log .log (
53- Level . FINE ,
55+ FINE ,
5456 "Stack traces will be added to spans with a minimum duration of {0} nanos" ,
5557 minDuration );
5658 }
@@ -70,7 +72,7 @@ static Predicate<ReadableSpan> getFilterPredicate(ConfigProperties properties) {
7072
7173 if (filter == null ) {
7274 // if value is set, lack of filtering is likely an error and must be reported
73- Level disabledLogLevel = filterClass != null ? Level . SEVERE : Level . FINE ;
75+ java . util . logging . Level disabledLogLevel = filterClass != null ? SEVERE : FINE ;
7476 log .log (disabledLogLevel , "Span stacktrace filtering disabled" );
7577 return span -> true ;
7678 } else {
0 commit comments