function setMeasurement(name, value, unit) {
  // eslint-disable-next-line deprecation/deprecation
  const transaction = utils.getActiveTransaction();
  if (transaction) {
    // eslint-disable-next-line deprecation/deprecation
    transaction.setMeasurement(name, value, unit);
  }
}
Adds a measurement to the current active transaction.