Adds the ability to configure things needed by stackdriver
We will eventually need to change the encoder to use their format. Also, stackdriver does not support shared spans.
This commit is contained in:
@@ -34,6 +34,9 @@ public class SleuthProperties {
|
||||
/** When true, generate 128-bit trace IDs instead of 64-bit ones. */
|
||||
private boolean traceId128 = false;
|
||||
|
||||
/** True means the tracing system supports sharing a span ID between a client and server. */
|
||||
private boolean supportsJoin = true;
|
||||
|
||||
/**
|
||||
* List of baggage key names that should be propagated out of process.
|
||||
* These keys will be prefixed with `baggage` before the actual key.
|
||||
@@ -70,6 +73,14 @@ public class SleuthProperties {
|
||||
this.traceId128 = traceId128;
|
||||
}
|
||||
|
||||
public boolean isSupportsJoin() {
|
||||
return this.supportsJoin;
|
||||
}
|
||||
|
||||
public void setSupportsJoin(boolean supportsJoin) {
|
||||
this.supportsJoin = supportsJoin;
|
||||
}
|
||||
|
||||
public List<String> getBaggageKeys() {
|
||||
return this.baggageKeys;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ public class TraceAutoConfiguration {
|
||||
.currentTraceContext(currentTraceContext)
|
||||
.spanReporter(adjustedReporter(reporter))
|
||||
.traceId128Bit(sleuthProperties.isTraceId128())
|
||||
.supportsJoin(sleuthProperties.isSupportsJoin())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user