Update servlet attr names to match log attr names (#2593)
This commit is contained in:
parent
f26901df45
commit
811259376e
|
@ -32,8 +32,8 @@ public abstract class ServletHttpServerTracer<RESPONSE>
|
|||
|
||||
SpanContext spanContext = Span.fromContext(context).getSpanContext();
|
||||
// we do this e.g. so that servlet containers can use these values in their access logs
|
||||
request.setAttribute("traceId", spanContext.getTraceId());
|
||||
request.setAttribute("spanId", spanContext.getSpanId());
|
||||
request.setAttribute("trace_id", spanContext.getTraceId());
|
||||
request.setAttribute("span_id", spanContext.getSpanId());
|
||||
|
||||
return context;
|
||||
}
|
||||
|
|
|
@ -280,8 +280,8 @@ class TestAccessLogValve extends ValveBase implements AccessLog {
|
|||
|
||||
void log(Request request, Response response, long time) {
|
||||
synchronized (loggedIds) {
|
||||
loggedIds.add(new Tuple2(request.getAttribute("traceId"),
|
||||
request.getAttribute("spanId")))
|
||||
loggedIds.add(new Tuple2(request.getAttribute("trace_id"),
|
||||
request.getAttribute("span_id")))
|
||||
loggedIds.notifyAll()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue