mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-28 13:09:09 +00:00
Handle null span in LazyTracingSpanContextSupplier consistently
See gh-32817
This commit is contained in:
committed by
Andy Wilkinson
parent
67e4ac4f1e
commit
8d17d2d443
+4
-2
@@ -67,12 +67,14 @@ public class ExemplarsAutoConfiguration {
|
||||
|
||||
@Override
|
||||
public String getTraceId() {
|
||||
return currentSpan().context().traceId();
|
||||
Span currentSpan = currentSpan();
|
||||
return (currentSpan != null) ? currentSpan.context().traceId() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSpanId() {
|
||||
return currentSpan().context().spanId();
|
||||
Span currentSpan = currentSpan();
|
||||
return (currentSpan != null) ? currentSpan.context().spanId() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user