Changed isSampled() to Boolean since we could also defer a smapling decision
This commit is contained in:
@@ -46,8 +46,8 @@ public interface TraceContext {
|
||||
String spanId();
|
||||
|
||||
/**
|
||||
* @return {@code true} when sampled
|
||||
* @return {@code true} when sampled, {@code false} when not sampled and {@code null} when sampling decision should be deferred
|
||||
*/
|
||||
boolean isSampled();
|
||||
Boolean isSampled();
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class NoOpTraceContext implements TraceContext {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSampled() {
|
||||
public Boolean isSampled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class BraveTraceContext implements TraceContext {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSampled() {
|
||||
public Boolean isSampled() {
|
||||
return this.traceContext.sampled();
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ class OtelTraceContext implements TraceContext {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSampled() {
|
||||
public Boolean isSampled() {
|
||||
return this.delegate.isSampled();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user