From 58520897a1f435aa66bf6271c23509200f995cbb Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 2 Apr 2024 13:17:17 +0200 Subject: [PATCH] ref(v7): Deprecate `addRequestDataToTransaction` This is not used/needed anymore in v8, and also is coupled to transactions. --- packages/node/src/handlers.ts | 1 + packages/utils/src/requestdata.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/node/src/handlers.ts b/packages/node/src/handlers.ts index b1140d0d9c28..333c9022bf9b 100644 --- a/packages/node/src/handlers.ts +++ b/packages/node/src/handlers.ts @@ -105,6 +105,7 @@ export function tracingHandler(): ( // Push `transaction.finish` to the next event loop so open spans have a chance to finish before the transaction // closes setImmediate(() => { + // eslint-disable-next-line deprecation/deprecation addRequestDataToTransaction(transaction, req); setHttpStatus(transaction, res.statusCode); transaction.end(); diff --git a/packages/utils/src/requestdata.ts b/packages/utils/src/requestdata.ts index aaa1898e1f55..9d80bc66c69b 100644 --- a/packages/utils/src/requestdata.ts +++ b/packages/utils/src/requestdata.ts @@ -64,7 +64,9 @@ export type TransactionNamingScheme = 'path' | 'methodPath' | 'handler'; /** * Sets parameterized route as transaction name e.g.: `GET /users/:id` - * Also adds more context data on the transaction from the request + * Also adds more context data on the transaction from the request. + * + * @deprecated This utility will be removed in v8. */ export function addRequestDataToTransaction( transaction: Transaction | undefined,