TextMapGetter

org.typelevel.otel4s.context.propagation.TextMapGetter
See theTextMapGetter companion object
trait TextMapGetter[A]

Offers a way to get a string value associated with a given key.

A type class can be implemented for any data structure that stores key-value pairs.

Implicit instances of TextMapGetter are provided for scala.collection.Map and scala.collection.Seq types. The behavior of TextMapGetter[Seq[(String, String)]] when duplicate keys are present is unspecified, and may change at any time. In particular, if the behavior of Seq types with duplicate keys is ever specified by open telemetry, the behavior of such implicit instances will be made to match the specification.

Type parameters

A

the type of the key-value carrier

Attributes

See also

See TextMapUpdater to update values of an immutable carrier

Companion
object
Source
TextMapGetter.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def get(carrier: A, key: String): Option[String]

Gets a string value from the carrier associated with the given key.

Gets a string value from the carrier associated with the given key.

Value parameters

carrier

the carrier to get a value from

key

the key to get the value at

Attributes

Returns

a scala.Some if the key is present in carrier and scala.None otherwise

Source
TextMapGetter.scala
def keys(carrier: A): Iterable[String]

Returns a collection of all available keys in the given carrier.

Returns a collection of all available keys in the given carrier. The collection SHOULD never return duplicates.

Value parameters

carrier

the carrier to get keys from

Attributes

Returns

an scala.collection.Iterable of all the keys in the carrier

Source
TextMapGetter.scala