File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
main/java/io/opentelemetry/contrib/stacktrace
test/java/io/opentelemetry/contrib/stacktrace Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 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 ;
1922import javax .annotation .Nullable ;
2023
2124@ AutoService (AutoConfigurationCustomizerProvider .class )
22- public class StackTraceAutoConfig implements AutoConfigurationCustomizerProvider {
25+ public final class StackTraceAutoConfig implements AutoConfigurationCustomizerProvider {
2326
2427 private static final Logger log = Logger .getLogger (StackTraceAutoConfig .class .getName ());
2528
@@ -50,7 +53,7 @@ static long getMinDuration(ConfigProperties properties) {
5053 log .fine ("Stack traces capture is disabled" );
5154 } else {
5255 log .log (
53- Level . FINE ,
56+ FINE ,
5457 "Stack traces will be added to spans with a minimum duration of {0} nanos" ,
5558 minDuration );
5659 }
@@ -70,7 +73,7 @@ static Predicate<ReadableSpan> getFilterPredicate(ConfigProperties properties) {
7073
7174 if (filter == null ) {
7275 // if value is set, lack of filtering is likely an error and must be reported
73- Level disabledLogLevel = filterClass != null ? Level . SEVERE : Level . FINE ;
76+ Level disabledLogLevel = filterClass != null ? SEVERE : FINE ;
7477 log .log (disabledLogLevel , "Span stacktrace filtering disabled" );
7578 return span -> true ;
7679 } else {
Original file line number Diff line number Diff line change 1414import java .io .StringWriter ;
1515import java .util .function .Predicate ;
1616
17- public class StackTraceSpanProcessor implements ExtendedSpanProcessor {
17+ public final class StackTraceSpanProcessor implements ExtendedSpanProcessor {
1818
1919 private final long minSpanDurationNanos ;
2020
Original file line number Diff line number Diff line change 1515import java .util .function .Predicate ;
1616import org .junit .jupiter .api .Test ;
1717
18- public class StackTraceAutoConfigTest {
18+ class StackTraceAutoConfigTest {
1919
2020 @ Test
2121 void defaultConfig () {
You can’t perform that action at this time.
0 commit comments