Package io.sentry.spring.tracing
Class SpringMvcTransactionNameProvider
java.lang.Object
io.sentry.spring.tracing.SpringMvcTransactionNameProvider
- All Implemented Interfaces:
TransactionNameProvider
@Internal
public final class SpringMvcTransactionNameProvider
extends 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.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
provideTransactionName
(@NotNull javax.servlet.http.HttpServletRequest request) Resolves transaction name fromHttpServletRequest
.@NotNull TransactionNameSource
Returns the source of the transaction name.
-
Constructor Details
-
SpringMvcTransactionNameProvider
public SpringMvcTransactionNameProvider()
-
-
Method Details
-
provideTransactionName
@Nullable public @Nullable String provideTransactionName(@NotNull @NotNull javax.servlet.http.HttpServletRequest request) Description copied from interface:TransactionNameProvider
Resolves transaction name fromHttpServletRequest
.- Specified by:
provideTransactionName
in interfaceTransactionNameProvider
- Parameters:
request
- - the http request- Returns:
- transaction name or
null
if not resolved
-
provideTransactionSource
Description copied from interface:TransactionNameProvider
Returns the source of the transaction name. Only to be used internally.- Specified by:
provideTransactionSource
in interfaceTransactionNameProvider
-