Module: Appsignal::Integrations::ShoryukenTraceContext::MessageAttributeGetter
- Defined in:
- lib/appsignal/integrations/shoryuken.rb
Overview
Reads a trace header back out of a message attribute. Works both for the
plain hash we inject and for the Aws::SQS::Types::MessageAttributeValue
struct delivered on receive, since both respond to [:string_value] /
[:data_type].
Class Method Summary collapse
Class Method Details
.get(carrier, key) ⇒ Object
35 36 37 38 |
# File 'lib/appsignal/integrations/shoryuken.rb', line 35 def self.get(carrier, key) attribute = carrier[key] attribute[:string_value] if attribute && attribute[:data_type] == "String" end |