function addRequestDataToTransaction(
  transaction,
  req,
  deps,
) {
  if (!transaction) return;
  // eslint-disable-next-line deprecation/deprecation
  if (!transaction.metadata.source || transaction.metadata.source === 'url') {
    // Attempt to grab a parameterized route off of the request
    const [name, source] = extractPathForTransaction(req, { path: true, method: true });
    transaction.updateName(name);
    // TODO: SEMANTIC_ATTRIBUTE_SENTRY_SOURCE is in core, align this once we merge utils & core
    // eslint-disable-next-line deprecation/deprecation
    transaction.setMetadata({ source });
  }
  transaction.setAttribute('url', req.originalUrl || req.url);
  if (req.baseUrl) {
    transaction.setAttribute('baseUrl', req.baseUrl);
  }
  // TODO: We need to rewrite this to a flat format?
  // eslint-disable-next-line deprecation/deprecation
  transaction.setData('query', extractQueryParams(req, deps));
}
Sets parameterized route as transaction name e.g.: `GET /users/:id`
Also adds more context data on the transaction from the request.

@deprecated This utility will be removed in v8.