# opentelemetry.propagators.composite

## Module contents

class opentelemetry.propagators.composite.CompositePropagator(propagators)

  Bases: `TextMapPropagator`

  CompositePropagator provides a mechanism for combining multiple propagators into a single one.

  Parameters:

    propagators (`Sequence`[`TextMapPropagator`]) – the list of propagators to use

  extract(carrier, context=None, getter=<opentelemetry.propagators.textmap.DefaultGetter object>)

    Run each of the configured propagators with the given context and carrier. Propagators are run in the order they are configured, if multiple propagators write the same context key, the propagator later in the list will override previous propagators.

    See `opentelemetry.propagators.textmap.TextMapPropagator.extract`

    Return type:

      `Context`

  inject(carrier, context=None, setter=<opentelemetry.propagators.textmap.DefaultSetter object>)

    Run each of the configured propagators with the given context and carrier. Propagators are run in the order they are configured, if multiple propagators write the same carrier key, the propagator later in the list will override previous propagators.

    See `opentelemetry.propagators.textmap.TextMapPropagator.inject`

    Return type:

      `None`

  property fields: Set[str]

    Returns a set with the fields set in `inject`.

    See `opentelemetry.propagators.textmap.TextMapPropagator.fields`

class opentelemetry.propagators.composite.CompositeHTTPPropagator(propagators)

  Bases: `CompositePropagator`

  CompositeHTTPPropagator provides a mechanism for combining multiple propagators into a single one.