src/Services/TracerCapsule.php
/**
     * Injects the span into the carrier.
     *
     * @return string
     */
Injects the span into the carrier.
@return string
Injects the span into the carrier . @return string
public static function injectCarrier(): string
    {
        $trace = GlobalTracer::get();
        $span = $trace->getActiveSpan();
        if (isset($span) === false) {
            return '';
        }
        $trace->inject($span->getContext(), Format::TEXT_MAP, $carrier);
        if (self::isValidCarrier($carrier) === true) {
            return base64_encode(json_encode($carrier));
        }
        return '';
    }
public static function injectCarrier ( ) : string { $ trace = GlobalTracer :: get ( ) ; $ span = $ trace -> getActiveSpan ( ) ; if ( isset ( $ span ) === false ) { return '' ; } $ trace -> inject ( $ span -> getContext ( ) , Format :: TEXT_MAP , $ carrier ) ; if ( self :: isValidCarrier ( $ carrier ) === true ) { return base64_encode ( json_encode ( $ carrier ) ) ; } return '' ; }
Injects the span into the carrier.
Injects the span into the carrier .