Class SpringMvcTransactionNameProvider

  • All Implemented Interfaces:
    TransactionNameProvider

    @Internal
    public final class SpringMvcTransactionNameProvider
    extends java.lang.Object
    implements TransactionNameProvider
    Resolves transaction name using HttpServletRequest.getMethod() and templated route that handled the request. To return correct transaction name, it must be used after request is processed by RequestMappingInfoHandlerMapping where HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE is set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @Nullable java.lang.String provideTransactionName​(@NotNull javax.servlet.http.HttpServletRequest request)
      Resolves transaction name from HttpServletRequest.
      @NotNull io.sentry.protocol.TransactionNameSource provideTransactionSource()
      Returns the source of the transaction name.
      • Methods inherited from class java.lang.Object

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

      • SpringMvcTransactionNameProvider

        public SpringMvcTransactionNameProvider()
    • Method Detail

      • provideTransactionName

        @Nullable
        public @Nullable java.lang.String provideTransactionName​(@NotNull
                                                                 @NotNull javax.servlet.http.HttpServletRequest request)
        Description copied from interface: TransactionNameProvider
        Resolves transaction name from HttpServletRequest.
        Specified by:
        provideTransactionName in interface TransactionNameProvider
        Parameters:
        request - - the http request
        Returns:
        transaction name or null if not resolved