Removed the - signs from default spring var resolution

with the current setup we're using the MDC's default interpolation as a default for spring var resolution (which makes no sense)
with this change we're removing the dashes

fixes gh-1396
This commit is contained in:
Marcin Grzejszczak
2019-07-26 13:05:38 +02:00
parent b59277f0ef
commit 51c367e45e
3 changed files with 19 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ public class TraceEnvironmentPostProcessor implements EnvironmentPostProcessor {
if (Boolean
.parseBoolean(environment.getProperty("spring.sleuth.enabled", "true"))) {
map.put("logging.pattern.level", "%5p [${spring.zipkin.service.name:"
+ "${spring.application.name:-}},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]");
+ "${spring.application.name:}},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]");
}
addOrReplace(environment.getPropertySources(), map);
}