use of com.github.kristofa.brave.ServerSpanState in project zipkin by openzipkin.
the class TraceZipkinMySQLStorageAutoConfiguration method executor.
@Bean
@ConditionalOnMissingBean(Executor.class)
public Executor executor(ServerSpanState serverState) {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setThreadNamePrefix("MySQLStorage-");
executor.initialize();
return command -> {
ServerSpan currentSpan = serverState.getCurrentServerSpan();
executor.execute(() -> {
serverState.setCurrentServerSpan(currentSpan);
command.run();
});
};
}
Aggregations