Skip to content

Commit b5022f8

Browse files
author
Luca Forstner
committed
Address review feedback
1 parent 003095f commit b5022f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/node/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const INTEGRATIONS = {
6565

6666
export { 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')`.

packages/node/src/trpc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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> = {

0 commit comments

Comments
 (0)