Merge branch '3.1.x'
This commit is contained in:
commit
3a796aedea
|
@ -29,7 +29,7 @@ import brave.baggage.BaggagePropagation;
|
|||
import brave.baggage.BaggagePropagation.FactoryBuilder;
|
||||
import brave.baggage.BaggagePropagationConfig;
|
||||
import brave.baggage.BaggagePropagationCustomizer;
|
||||
import brave.baggage.CorrelationScopeConfig;
|
||||
import brave.baggage.CorrelationScopeConfig.SingleCorrelationField;
|
||||
import brave.baggage.CorrelationScopeCustomizer;
|
||||
import brave.baggage.CorrelationScopeDecorator;
|
||||
import brave.context.slf4j.MDCScopeDecorator;
|
||||
|
@ -51,6 +51,7 @@ import io.micrometer.tracing.exporter.SpanFilter;
|
|||
import io.micrometer.tracing.exporter.SpanReporter;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Baggage.Correlation;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Propagation.PropagationType;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
|
@ -244,11 +245,13 @@ public class BraveAutoConfiguration {
|
|||
matchIfMissing = true)
|
||||
CorrelationScopeCustomizer correlationFieldsCorrelationScopeCustomizer() {
|
||||
return (builder) -> {
|
||||
List<String> correlationFields = this.tracingProperties.getBaggage().getCorrelation().getFields();
|
||||
for (String field : correlationFields) {
|
||||
builder.add(CorrelationScopeConfig.SingleCorrelationField.newBuilder(BaggageField.create(field))
|
||||
Correlation correlationProperties = this.tracingProperties.getBaggage().getCorrelation();
|
||||
for (String field : correlationProperties.getFields()) {
|
||||
BaggageField baggageField = BaggageField.create(field);
|
||||
SingleCorrelationField correlationField = SingleCorrelationField.newBuilder(baggageField)
|
||||
.flushOnUpdate()
|
||||
.build());
|
||||
.build();
|
||||
builder.add(correlationField);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -37,7 +37,10 @@ Add the following application properties:
|
|||
|
||||
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
|
||||
----
|
||||
management.tracing.sampling.probability: 1.0
|
||||
management:
|
||||
tracing:
|
||||
sampling:
|
||||
probability: 1.0
|
||||
----
|
||||
|
||||
By default, Spring Boot samples only 10% of requests to prevent overwhelming the trace backend.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<Property name="LOG_LEVEL_PATTERN">%5p</Property>
|
||||
<Property name="LOG_DATEFORMAT_PATTERN">yyyy-MM-dd'T'HH:mm:ss.SSSXXX</Property>
|
||||
<Property name="CONSOLE_LOG_PATTERN">%clr{%d{${sys:LOG_DATEFORMAT_PATTERN}}}{faint} %clr{${sys:LOG_LEVEL_PATTERN}} %clr{%pid}{magenta} %clr{---}{faint} %clr{[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
|
||||
<Property name="FILE_LOG_PATTERN">%d{${LOG_DATEFORMAT_PATTERN}} ${LOG_LEVEL_PATTERN} %pid --- [%t] %-40.40c{1.} : %m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
|
||||
<Property name="FILE_LOG_PATTERN">%d{${sys:LOG_DATEFORMAT_PATTERN}} ${sys:LOG_LEVEL_PATTERN} %pid --- [%t] %-40.40c{1.} : %m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT" follow="true">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="warn" name="test" packages="">
|
||||
<Configuration status="warn" name="test">
|
||||
<Properties>
|
||||
<Property name="LOG_EXCEPTION_CONVERSION_WORD">%xwEx</Property>
|
||||
<Property name="LOG_LEVEL_PATTERN">%5p</Property>
|
||||
|
|
Loading…
Reference in New Issue