Class TraceContextServletFilter

java.lang.Object
io.jenkins.plugins.opentelemetry.servlet.TraceContextServletFilter
All Implemented Interfaces:
ExtensionPoint, io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener, Comparable<io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener>, javax.servlet.Filter

@Extension public class TraceContextServletFilter extends Object implements javax.servlet.Filter, io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener
Must be a Filter rather than a HttpServletFilter because it must wrap the invocation of the FilterChain to ensure that the Span is correctly associated with the current Context.
  • Field Details

    • JENKINS_TRIGGER_BUILD_URL_PATTERN

      protected static final Pattern JENKINS_TRIGGER_BUILD_URL_PATTERN
  • Constructor Details

    • TraceContextServletFilter

      public TraceContextServletFilter()
  • Method Details

    • doFilter

      public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • _doFilter

      public void _doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • afterConfiguration

      public void afterConfiguration(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties configProperties)
      Specified by:
      afterConfiguration in interface io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object