@Test public void givenCustomTag_whenOnRequest_thenItShouldNotAddTag() { decorator = new ServletFilterHeaderSpanDecorator(headerEntries, "HEADER."); Mockito.when(httpServletRequest.getHeader("If-Match")).thenReturn("10"); decorator.onRequest(httpServletRequest, span); Mockito.verify(span).setTag("HEADER.if-match", "10"); }
@Override public void onRequest(HttpServletRequest httpServletRequest, Span span) { for (HeaderEntry headerEntry : allowedHeaders) { String headerValue = httpServletRequest.getHeader(headerEntry.getHeader()); if (headerValue != null && !headerValue.isEmpty()) { buildTag(headerEntry.getTag()).set(span, headerValue); } } }
ServletFilterHeaderSpanDecorator implements ServletFilterSpanDecorator { @Override public void onRequest(HttpServletRequest httpServletRequest, Span span) { for (HeaderEntry headerEntry : allowedHeaders) { String headerValue = httpServletRequest.getHeader(headerEntry.getHeader()); if (headerValue != null && !headerValue.isEmpty()) { buildTag(headerEntry.getTag()).set(span, headerValue); } } } }
ServletFilterHeaderSpanDecorator implements ServletFilterSpanDecorator { @Override public void onRequest(HttpServletRequest httpServletRequest, Span span) { for (HeaderEntry headerEntry : allowedHeaders) { String headerValue = httpServletRequest.getHeader(headerEntry.getHeader()); if (headerValue != null && !headerValue.isEmpty()) { buildTag(headerEntry.getTag()).set(span, headerValue); } } } ServletFilterHeaderSpanDecorator(List<HeaderEntry> allowedHeaders);  ServletFilterHeaderSpanDecorator(List<HeaderEntry> allowedHeaders, String prefix); }
ServletFilterHeaderSpanDecorator implements ServletFilterSpanDecorator { @Override public void onRequest(HttpServletRequest httpServletRequest, Span span) { for (HeaderEntry headerEntry : allowedHeaders) { String headerValue = httpServletRequest.getHeader(headerEntry.getHeader()); if (headerValue != null && !headerValue.isEmpty()) { buildTag(headerEntry.getTag()).set(span, headerValue); } } } ServletFilterHeaderSpanDecorator(List<HeaderEntry> allowedHeaders);  ServletFilterHeaderSpanDecorator(List<HeaderEntry> allowedHeaders, String prefix); @Override void onRequest(HttpServletRequest httpServletRequest, Span span); @Override void onResponse(HttpServletRequest httpServletRequest,
        HttpServletResponse httpServletResponse, Span span); @Override void onError(HttpServletRequest httpServletRequest,
        HttpServletResponse httpServletResponse, Throwable exception, Span span); @Override void onTimeout(HttpServletRequest httpServletRequest,
        HttpServletResponse httpServletResponse, long timeout, Span span); String getPrefix(); List<HeaderEntry> getAllowedHeaders(); }
ServletFilterHeaderSpanDecorator implements ServletFilterSpanDecorator { @Override public void onRequest(HttpServletRequest httpServletRequest, Span span) { for (HeaderEntry headerEntry : allowedHeaders) { String headerValue = httpServletRequest.getHeader(headerEntry.getHeader()); if (headerValue != null && !headerValue.isEmpty()) { buildTag(headerEntry.getTag()).set(span, headerValue); } } } ServletFilterHeaderSpanDecorator(List<HeaderEntry> allowedHeaders);  ServletFilterHeaderSpanDecorator(List<HeaderEntry> allowedHeaders, String prefix); @Override void onRequest(HttpServletRequest httpServletRequest, Span span); @Override void onResponse(HttpServletRequest httpServletRequest,
        HttpServletResponse httpServletResponse, Span span); @Override void onError(HttpServletRequest httpServletRequest,
        HttpServletResponse httpServletResponse, Throwable exception, Span span); @Override void onTimeout(HttpServletRequest httpServletRequest,
        HttpServletResponse httpServletResponse, long timeout, Span span); String getPrefix(); List<HeaderEntry> getAllowedHeaders();  }