setTransactionContext<T> method
Runs the operation even when no carrier has been registered.
Implementation
Future<T> setTransactionContext<T>(
EvaluationContext context,
FutureOr<T> Function() operation,
) async {
final propagator = _propagator;
if (propagator == null) return await operation();
final snapshot = context.snapshot();
return await runZoned(
() => propagator.setTransactionContext(snapshot, operation),
zoneValues: {_propagationScopeKey: _propagationEpoch},
);
}