Template Class CompositePropagator¶
Defined in File composite_propagator.h
Inheritance Relationships¶
Base Type¶
public opentelemetry::trace::propagation::TextMapPropagator< T >
Class Documentation¶
-
template<typename
T
>
classopentelemetry::trace::propagation
::
CompositePropagator
: public opentelemetry::trace::propagation::TextMapPropagator<T>¶ Public Types
-
using
Getter
= nostd::string_view (*)(const T &carrier, nostd::string_view trace_type)¶
-
using
Setter
= void (*)(T &carrier, nostd::string_view trace_type, nostd::string_view trace_description)¶
Public Functions
-
inline
CompositePropagator
(std::vector<std::unique_ptr<TextMapPropagator<T>>> propagators)¶
-
inline void
Inject
(Setter setter, T &carrier, const context::Context &context) noexcept override¶ Run each of the configured propagators with the given context and carrier. Propagators are run in the order they are configured, so if multiple propagators write the same carrier key, the propagator later in the list will “win”.
- Parameters
setter – Rules that manages how context will be injected to carrier.
carrier – Carrier into which context will be injected
context – Context to inject
-
inline context::Context
Extract
(Getter getter, const T &carrier, context::Context &context) noexcept override¶ Run each of the configured propagators with the given context and carrier. Propagators are run in the order they are configured, so if multiple propagators write the same context key, the propagator later in the list will “win”.
- Parameters
setter – Rules that manages how context will be extracte from carrier.
context – Context to add values to
carrier – Carrier from which to extract context
-
using