function _startTransaction(
  // eslint-disable-next-line deprecation/deprecation

  transactionContext,
  customSamplingContext,
) {
  // eslint-disable-next-line deprecation/deprecation
  const client = this.getClient();
  const options = (client && client.getOptions()) || {};

  const configInstrumenter = options.instrumenter || 'sentry';
  const transactionInstrumenter = transactionContext.instrumenter || 'sentry';

  if (configInstrumenter !== transactionInstrumenter) {
    debugBuild.DEBUG_BUILD &&
      utils.logger.error(
        `A transaction was started with instrumenter=\`${transactionInstrumenter}\`, but the SDK is configured with the \`${configInstrumenter}\` instrumenter.
The transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,
      );

    // eslint-disable-next-line deprecation/deprecation
    transactionContext.sampled = false;
  }

  // eslint-disable-next-line deprecation/deprecation
  let transaction$1 = new transaction.Transaction(transactionContext, this);
  transaction$1 = sampling.sampleTransaction(transaction$1, options, {
    name: transactionContext.name,
    parentSampled: transactionContext.parentSampled,
    transactionContext,
    attributes: {
      // eslint-disable-next-line deprecation/deprecation
      ...transactionContext.data,
      ...transactionContext.attributes,
    },
    ...customSamplingContext,
  });
  if (transaction$1.isRecording()) {
    transaction$1.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));
  }
  if (client && client.emit) {
    client.emit('startTransaction', transaction$1);
  }
  return transaction$1;
}
Creates a new transaction and adds a sampling decision if it doesn't yet have one.

The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if
it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an
"extension method."

@param this: The Hub starting the transaction
@param transactionContext: Data used to configure the transaction
@param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)

@returns The new transaction

@see {@link Hub.startTransaction}