我阅读了 Sleuth 文档,但没有找到有关更改默认参数名称“traceId”或“spanId”的信息。是否可以不添加额外的字段?
@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
Span currentSpan = this.tracer.currentSpan();
if (currentSpan == null) {
chain.doFilter(request, response);
return;
}
currentSpan.customizer().tag("correlationId", currentSpan.context().spanIdString());
chain.doFilter(request, response);
}