← ZIO Telemetry docs

Baggage

zio.telemetry.opentelemetry.baggage.Baggage
See theBaggage companion object
trait Baggage

Attributes

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

Members list

Value members

Abstract methods

def extract[C](propagator: BaggagePropagator, carrier: IncomingContextCarrier[C])(implicit trace: Trace): UIO[Unit]

Extracts the baggage data from carrier C into the current context.

Extracts the baggage data from carrier C into the current context.

Type parameters

C

carrier

Value parameters

carrier

mutable data from which the parent span is extracted

propagator

implementation of zio.telemetry.opentelemetry.baggage.propagation.BaggagePropagator

Attributes

Source
Baggage.scala
def get(name: String)(implicit trace: Trace): UIO[Option[String]]

Gets the value by a given name.

Gets the value by a given name.

Attributes

Returns

value

Source
Baggage.scala
def getAll(implicit trace: Trace): UIO[Map[String, String]]

Gets all values.

Gets all values.

Attributes

Returns

all values

Source
Baggage.scala
def getAllWithMetadata(implicit trace: Trace): UIO[Map[String, (String, String)]]

Gets all values accompanied by metadata.

Gets all values accompanied by metadata.

Attributes

Source
Baggage.scala
def getCurrentBaggageUnsafe(implicit trace: Trace): UIO[Baggage]

Gets the baggage from current context.

Gets the baggage from current context.

Attributes

Source
Baggage.scala
def inject[C](propagator: BaggagePropagator, carrier: OutgoingContextCarrier[C])(implicit trace: Trace): UIO[Unit]

Injects the baggage data from the current context into carrier C.

Injects the baggage data from the current context into carrier C.

Type parameters

C

carrier

Value parameters

carrier

mutable data from which the parent span is extracted

propagator

implementation of zio.telemetry.opentelemetry.baggage.propagation.BaggagePropagator

Attributes

Source
Baggage.scala
def remove(name: String)(implicit trace: Trace): UIO[Unit]

Removes the name/value by a given name.

Removes the name/value by a given name.

Attributes

Source
Baggage.scala
def set(name: String, value: String)(implicit trace: Trace): UIO[Unit]

Sets the new value for a given name.

Sets the new value for a given name.

Attributes

Source
Baggage.scala
def setWithMetadata(name: String, value: String, metadata: String)(implicit trace: Trace): UIO[Unit]

Sets the new value and metadata for a given name.

Sets the new value and metadata for a given name.

Value parameters

metadata

opaque string

Attributes

Source
Baggage.scala