ContextPropagators

org.typelevel.otel4s.context.propagation.ContextPropagators
See theContextPropagators companion trait

Attributes

Companion
trait
Source
ContextPropagators.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def noop[Ctx]: ContextPropagators[Ctx]

Creates a no-op implementation of the ContextPropagators.

Creates a no-op implementation of the ContextPropagators.

A TextMapPropagator has no-op implementation too.

Attributes

Source
ContextPropagators.scala
def of[Ctx](textMapPropagators: TextMapPropagator[Ctx]*): ContextPropagators[Ctx]

Creates a ContextPropagators which can be used to extract and inject context in text payloads with the given TextMapPropagator.

Creates a ContextPropagators which can be used to extract and inject context in text payloads with the given TextMapPropagator.

If multiple text map propagators are passed, the combined (composite) TextMapPropagator instance will be created.

It's a shortcut for:

ContextPropagators.of(TextMapPropagator.of(w3cPropagator, httpTracePropagator))

Type parameters

Ctx

the context to use to extract or inject data

Value parameters

textMapPropagators

the propagators to use for injection and extraction

Attributes

See also
Example

val w3cPropagator: TextMapPropagator[Context] = ???
val httpTracePropagator: TextMapPropagator[Context] = ???
val contextPropagators = ContextPropagators.of(w3cPropagator, httpTracePropagator)
Source
ContextPropagators.scala