Module: Appsignal::Integrations::ShoryukenTraceContext::MessageAttributeSetter

Defined in:
lib/appsignal/integrations/shoryuken.rb

Overview

Writes each trace header as an SQS message attribute, matching the shape OpenTelemetry's aws-sdk instrumentation injects on send.

Class Method Summary collapse

Class Method Details

.set(carrier, key, value) ⇒ Object



23
24
25
26
27
# File 'lib/appsignal/integrations/shoryuken.rb', line 23

def self.set(carrier, key, value)
  return if carrier.length >= MAX_MESSAGE_ATTRIBUTES

  carrier[key] = { :string_value => value, :data_type => "String" }
end