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();
|
SpanContext spanContext = Span.fromContext(context).getSpanContext();
|
||||||
// we do this e.g. so that servlet containers can use these values in their access logs
|
// we do this e.g. so that servlet containers can use these values in their access logs
|
||||||
request.setAttribute("traceId", spanContext.getTraceId());
|
request.setAttribute("trace_id", spanContext.getTraceId());
|
||||||
request.setAttribute("spanId", spanContext.getSpanId());
|
request.setAttribute("span_id", spanContext.getSpanId());
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,8 +280,8 @@ class TestAccessLogValve extends ValveBase implements AccessLog {
|
||||||
|
|
||||||
void log(Request request, Response response, long time) {
|
void log(Request request, Response response, long time) {
|
||||||
synchronized (loggedIds) {
|
synchronized (loggedIds) {
|
||||||
loggedIds.add(new Tuple2(request.getAttribute("traceId"),
|
loggedIds.add(new Tuple2(request.getAttribute("trace_id"),
|
||||||
request.getAttribute("spanId")))
|
request.getAttribute("span_id")))
|
||||||
loggedIds.notifyAll()
|
loggedIds.notifyAll()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue