withSpan method

Context withSpan(
  1. APISpan span
)

Creates a new Context with the given span set as active

Implementation

Context withSpan(APISpan span) {
  // Create a new context with both span and span context
  return ContextCreate.create(contextMap: {
    ..._values,
    _spanKey: span,
    _spanContextKey: span.spanContext,
  });
}