src/Services/TracerCapsule.php
/**
     * Extracts the span from the carrier.
     *
     * @param string      $name    The name of the operation
     * @param null|string $carrier The carrier for the span
     *
     * @return Span
     */
Extracts the span from the carrier.
@param string      $name    The name of the operation
@param null|string $carrier The carrier for the span

@return Span
Extracts the span from the carrier . @param string $name The name of the operation @param null|string $carrier The carrier for the span @return Span
public static function extractCarrier(string $name, ?string $carrier): Span
    {
        $tracer = GlobalTracer::get();
        $span = $tracer->startSpan($name);
        $carrier = self::decodeCarrier($carrier);
        if (self::isValidCarrier($carrier) === true) {
            $context = $tracer->extract(Format::TEXT_MAP, $carrier);
            $span = $tracer->startSpan($name, ['child_of' => $context->unwrapped()]);
        }
        $tracer->getScopeManager()->activate($span);
        return $span;
    }
public static function extractCarrier ( string $ name , ? string $ carrier ) : Span { $ tracer = GlobalTracer :: get ( ) ; $ span = $ tracer -> startSpan ( $ name ) ; $ carrier = self :: decodeCarrier ( $ carrier ) ; if ( self :: isValidCarrier ( $ carrier ) === true ) { $ context = $ tracer -> extract ( Format :: TEXT_MAP , $ carrier ) ; $ span = $ tracer -> startSpan ( $ name , [ 'child_of' => $ context -> unwrapped ( ) ] ) ; } $ tracer -> getScopeManager ( ) -> activate ( $ span ) ; return $ span ; }
Extracts the span from the carrier.
Extracts the span from the carrier .