OpenTelemetry SDK
    Preparing search index...

    Singleton object which represents the entry point to the OpenTelemetry Propagation API

    1.0.0

    interface PropagationAPI {
        createBaggage: (entries?: Record<string, BaggageEntry>) => Baggage;
        deleteBaggage: (context: Context) => Context;
        getActiveBaggage: () => Baggage | undefined;
        getBaggage: (context: Context) => Baggage | undefined;
        setBaggage: (context: Context, baggage: Baggage) => Context;
        disable(): void;
        extract<Carrier>(
            context: Context,
            carrier: Carrier,
            getter?: TextMapGetter<Carrier>,
        ): Context;
        fields(): string[];
        inject<Carrier>(
            context: Context,
            carrier: Carrier,
            setter?: TextMapSetter<Carrier>,
        ): void;
        setGlobalPropagator(propagator: TextMapPropagator): boolean;
    }
    Index
    createBaggage: (entries?: Record<string, BaggageEntry>) => Baggage = createBaggage

    Type Declaration

      • (entries?: Record<string, BaggageEntry>): Baggage
      • Create a new Baggage with optional entries

        Parameters

        • entries: Record<string, BaggageEntry> = {}

          An array of baggage entries the new baggage should contain

        Returns Baggage

    deleteBaggage: (context: Context) => Context = deleteBaggage

    Type Declaration

    getActiveBaggage: () => Baggage | undefined = getActiveBaggage

    Type Declaration

      • (): Baggage | undefined
      • Retrieve the current baggage from the active/current context

        Returns Baggage | undefined

        Extracted baggage from the context

    getBaggage: (context: Context) => Baggage | undefined = getBaggage

    Type Declaration

      • (context: Context): Baggage | undefined
      • Retrieve the current baggage from the given context

        Parameters

        Returns Baggage | undefined

        Extracted baggage from the context

    setBaggage: (context: Context, baggage: Baggage) => Context = setBaggage

    Type Declaration

    • Return a list of all fields which may be used by the propagator.

      Returns string[]