Skip to content

Commit 6ff778e

Browse files
committed
Context instead of data
1 parent 8ab4c72 commit 6ff778e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/node/src/handlers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,15 +344,15 @@ export async function trpcMiddleware(options: SentryTrpcMiddlewareOptions = {})
344344
sentryTransaction.setName(`trcp/${path}`, 'route');
345345
sentryTransaction.op = 'rpc.server';
346346

347-
const trpcData: Record<string, unknown> = {
348-
procedureType: type,
347+
const trpcContext: Record<string, unknown> = {
348+
'Procedure Type': type,
349349
};
350350

351351
if (options.attachRpcInput !== undefined ? options.attachRpcInput : clientOptions?.sendDefaultPii) {
352-
trpcData.procedureInput = normalize(rawInput);
352+
trpcContext['Input'] = normalize(rawInput);
353353
}
354354

355-
sentryTransaction.setData('trpc', trpcData);
355+
sentryTransaction.setContext('trpc', trpcContext);
356356
}
357357

358358
return next();

0 commit comments

Comments
 (0)