class OpenTelemetry::Context::Propagation::TextMapGetter

The default getter module provides a common methods for reading key from a carrier that implements [] and a keys method

Public Instance Methods

get(carrier, key) click to toggle source

Reads a key from a carrier that implements []. Useful for extract operations.

# File lib/opentelemetry/context/propagation/text_map_getter.rb, line 15
def get(carrier, key)
  carrier[key]
end
keys(carrier) click to toggle source

Reads all keys from a carrier. Useful for iterating over a carrier's keys.

# File lib/opentelemetry/context/propagation/text_map_getter.rb, line 21
def keys(carrier)
  carrier.keys
end