Skip to content

Commit

Permalink
ref(v7): Deprecate addRequestDataToTransaction (#11368)
Browse files Browse the repository at this point in the history
This is not used/needed anymore in v8, and also is coupled to
transactions.

Not sure if we need to add this to migration docs, as this is from utils
and was more internally used...? (Also, I guess if so we need to add it
to migration docs in a separate PR on develop...?)
  • Loading branch information
mydea committed Apr 2, 2024
1 parent 926dd3d commit fdcd1ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/node/src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion packages/utils/src/requestdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fdcd1ad

Please sign in to comment.