opentracing-contrib / java-web-servlet-filter

OpenTracing Java Web Servlet Filter Instrumentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is it possible to let user extarct certain custom http headers and add to span tag?

etsangsplk opened this issue · comments

I have some custom http headers whcih would like to include in span tags. the custom headers depends on applications. possible to do that?

Yes it is possible, you can implement https://github.com/opentracing-contrib/java-web-servlet-filter/blob/master/opentracing-web-servlet-filter/src/main/java/io/opentracing/contrib/web/servlet/filter/ServletFilterSpanDecorator.java and supply it to tracing filter constructor or use standard filter and get the active span from the tracer or scope manager.