File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ const INTEGRATIONS = {
6565
6666export { INTEGRATIONS as Integrations , Handlers } ;
6767
68- export { sentryTrpcMiddleware } from './trpc' ;
68+ export { trpcMiddleware } from './trpc' ;
6969
7070// We need to patch domain on the global __SENTRY__ object to make it work for node in cross-platform packages like
7171// @sentry /core. If we don't do this, browser bundlers will have troubles resolving `require('domain')`.
Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ interface TrpcMiddlewareArguments<T> {
1818 * Use the Sentry tRPC middleware in combination with the Sentry server integration,
1919 * e.g. Express Request Handlers or Next.js SDK.
2020 */
21- export async function sentryTrpcMiddleware ( options : SentryTrpcMiddlewareOptions = { } ) {
21+ export async function trpcMiddleware ( options : SentryTrpcMiddlewareOptions = { } ) {
2222 return function < T > ( { path, type, next, rawInput } : TrpcMiddlewareArguments < T > ) : T {
2323 const hub = getCurrentHub ( ) ;
2424 const clientOptions = hub . getClient ( ) ?. getOptions ( ) ;
2525 const sentryTransaction = hub . getScope ( ) ?. getTransaction ( ) ;
2626
2727 if ( sentryTransaction ) {
28- sentryTransaction . setName ( `${ path } () ` , 'route' ) ;
28+ sentryTransaction . setName ( `trcp/ ${ path } ` , 'route' ) ;
2929 sentryTransaction . op = 'rpc.server' ;
3030
3131 const trpcData : Record < string , unknown > = {
You can’t perform that action at this time.
0 commit comments