PassThroughPropagator

org.typelevel.otel4s.context.propagation.PassThroughPropagator
See thePassThroughPropagator companion object
final class PassThroughPropagator[Ctx, K <: (Key)] extends TextMapPropagator[Ctx]

A TextMapPropagator that extracts a specified collection of fields and stores them in a context, and extracts them from a context later for injection. It does not interact with telemetry.

Attributes

Companion
object
Source
PassThroughPropagator.scala
Graph
Supertypes
trait TextMapPropagator[Ctx]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def extract[A](ctx: Ctx, carrier: A)(implicit getter: TextMapGetter[A]): Ctx

Extracts key-value pairs from the given carrier and adds them to the given context.

Extracts key-value pairs from the given carrier and adds them to the given context.

Type parameters

A

the type of the carrier object

Value parameters

carrier

holds propagation fields

ctx

the context object to which the key-value pairs are added

Attributes

Returns

the new context with stored key-value pairs

Source
PassThroughPropagator.scala
def inject[A](ctx: Ctx, carrier: A)(implicit updater: TextMapUpdater[A]): A

Injects data from the context into a copy of the given immutable carrier for downstream consumers, for example as HTTP headers.

Injects data from the context into a copy of the given immutable carrier for downstream consumers, for example as HTTP headers.

This method is an extension to the OpenTelemetry specification to support immutable carrier types.

Type parameters

A

the type of the carrier

Value parameters

carrier

holds propagation fields

ctx

the context containing the value to be injected

Attributes

Returns

a copy of the carrier, with new fields injected

Source
PassThroughPropagator.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
PassThroughPropagator.scala

Concrete fields

The collection of propagation fields.

The collection of propagation fields.

Attributes

Source
PassThroughPropagator.scala