@ExperimentalApi public class OcHttpServletFilter extends Object implements javax.servlet.Filter
| Modifier and Type | Field and Description |
|---|---|
static String |
OC_EXTRACTOR
Set optional OC_EXTRACTOR attribute in
ServletContext with HttpExtractor
customExtractor. |
static String |
OC_PUBLIC_ENDPOINT
Set optional OC_PUBLIC_ENDPOINT attribute in
ServletContext with Boolean
publicEndpoint. |
static String |
OC_TRACE_PROPAGATOR
Set optional OC_TRACE_PROPAGATOR attribute in
ServletContext with TextFormat
propagator. |
| Constructor and Description |
|---|
OcHttpServletFilter()
Creates a new
OcHttpServletFilter. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
void |
init(javax.servlet.FilterConfig filterConfig) |
public static final String OC_TRACE_PROPAGATOR
ServletContext with TextFormat
propagator. By default TraceContextFormat is used to propagate trace context.public static final String OC_EXTRACTOR
ServletContext with HttpExtractor
customExtractor. Default extractor is used if custom extractor is not provided.public static final String OC_PUBLIC_ENDPOINT
ServletContext with Boolean
publicEndpoint. set to true for publicly accessible HTTP(S) server. If true then incoming *
tracecontext will be added as a link instead of as a parent. By default it is set to true.public OcHttpServletFilter()
OcHttpServletFilter.public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Filter