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 = {
65
65
66
66
export { INTEGRATIONS as Integrations , Handlers } ;
67
67
68
- export { sentryTrpcMiddleware } from './trpc' ;
68
+ export { trpcMiddleware } from './trpc' ;
69
69
70
70
// We need to patch domain on the global __SENTRY__ object to make it work for node in cross-platform packages like
71
71
// @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> {
18
18
* Use the Sentry tRPC middleware in combination with the Sentry server integration,
19
19
* e.g. Express Request Handlers or Next.js SDK.
20
20
*/
21
- export async function sentryTrpcMiddleware ( options : SentryTrpcMiddlewareOptions = { } ) {
21
+ export async function trpcMiddleware ( options : SentryTrpcMiddlewareOptions = { } ) {
22
22
return function < T > ( { path, type, next, rawInput } : TrpcMiddlewareArguments < T > ) : T {
23
23
const hub = getCurrentHub ( ) ;
24
24
const clientOptions = hub . getClient ( ) ?. getOptions ( ) ;
25
25
const sentryTransaction = hub . getScope ( ) ?. getTransaction ( ) ;
26
26
27
27
if ( sentryTransaction ) {
28
- sentryTransaction . setName ( `${ path } () ` , 'route' ) ;
28
+ sentryTransaction . setName ( `trcp/ ${ path } ` , 'route' ) ;
29
29
sentryTransaction . op = 'rpc.server' ;
30
30
31
31
const trpcData : Record < string , unknown > = {
You can’t perform that action at this time.
0 commit comments