Class: OpenTelemetry::Instrumentation::AwsSdk::MessageAttributeGetter

Inherits:
Object
  • Object
show all
Defined in:
lib/opentelemetry/instrumentation/aws_sdk/message_attributes.rb

Overview

The MessageAttributeGetter class provides methods for getting tracing information from SQS message.

Examples:

OpenTelemetry.propagation.extract(message, getter: MessageAttributeGetter)

Class Method Summary collapse

Class Method Details

.get(carrier, key) ⇒ Object



31
32
33
34
# File 'lib/opentelemetry/instrumentation/aws_sdk/message_attributes.rb', line 31

def self.get(carrier, key)
  message_attribute = carrier[key]
  message_attribute[:string_value] if message_attribute && message_attribute[:data_type] == 'String'
end