Class SentryTracingFilter

  • All Implemented Interfaces:
    javax.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

    public class SentryTracingFilter
    extends org.springframework.web.filter.OncePerRequestFilter
    Creates ITransaction around HTTP request executions.
    • Field Summary

      • Fields inherited from class org.springframework.web.filter.OncePerRequestFilter

        ALREADY_FILTERED_SUFFIX
      • Fields inherited from class org.springframework.web.filter.GenericFilterBean

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doFilterInternal​(@NotNull javax.servlet.http.HttpServletRequest httpRequest, @NotNull javax.servlet.http.HttpServletResponse httpResponse, @NotNull javax.servlet.FilterChain filterChain)  
      • Methods inherited from class org.springframework.web.filter.OncePerRequestFilter

        doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
      • Methods inherited from class org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SentryTracingFilter

        public SentryTracingFilter()
        Creates filter that resolves transaction name using SpringMvcTransactionNameProvider.

        Only requests that have HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE request attribute set are turned into transactions. This attribute is set in RequestMappingInfoHandlerMapping on request that have not been dropped with any Filter.

      • SentryTracingFilter

        public SentryTracingFilter​(@NotNull
                                   @NotNull io.sentry.IHub hub,
                                   @NotNull
                                   @NotNull TransactionNameProvider transactionNameProvider)
        Creates filter that resolves transaction name using transaction name provider given by parameter.
        Parameters:
        hub - - the hub
        transactionNameProvider - - transaction name provider.
      • SentryTracingFilter

        public SentryTracingFilter​(@NotNull
                                   @NotNull io.sentry.IHub hub)
    • Method Detail

      • doFilterInternal

        protected void doFilterInternal​(@NotNull
                                        @NotNull javax.servlet.http.HttpServletRequest httpRequest,
                                        @NotNull
                                        @NotNull javax.servlet.http.HttpServletResponse httpResponse,
                                        @NotNull
                                        @NotNull javax.servlet.FilterChain filterChain)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
        Specified by:
        doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
        Throws:
        javax.servlet.ServletException
        java.io.IOException