use of com.navercorp.pinpoint.bootstrap.context.Header in project pinpoint by naver.
the class HttpRequestExecutorExecuteMethodInterceptor method recordCookie.
protected void recordCookie(HttpMessage httpMessage, Trace trace) {
org.apache.http.Header[] cookies = httpMessage.getHeaders("Cookie");
for (org.apache.http.Header header : cookies) {
final String value = header.getValue();
if (value != null && !value.isEmpty()) {
if (cookieSampler.isSampling()) {
final SpanEventRecorder recorder = trace.currentSpanEventRecorder();
recorder.recordAttribute(AnnotationKey.HTTP_COOKIE, StringUtils.abbreviate(value, 1024));
}
// PMD complains if we use break here
return;
}
}
}
Aggregations