lib/elastic_apm/spies/sqs.rb in elastic-apm-4.1.0 vs lib/elastic_apm/spies/sqs.rb in elastic-apm-4.2.0
- old
+ new
@@ -48,22 +48,14 @@
match[1]
end
end
def self.span_context(queue_name, region)
- cloud = ElasticAPM::Span::Context::Destination::Cloud.new(region: region)
-
ElasticAPM::Span::Context.new(
- message: {
- queue_name: queue_name
- },
+ message: { queue_name: queue_name },
destination: {
- service: {
- resource: [SUBTYPE, queue_name].compact.join('/'),
- type: TYPE,
- name: SUBTYPE
- },
- cloud: cloud
+ service: { resource: "#{SUBTYPE}/#{queue_name}" },
+ cloud: { region: region }
}
)
end
# @api private