Class: Datadog::Tracing::Contrib::Aws::Service::SNS
- Defined in:
- lib/datadog/tracing/contrib/aws/service/sns.rb
Overview
SNS tag handlers.
Instance Method Summary collapse
Instance Method Details
#add_tags(span, params) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/datadog/tracing/contrib/aws/service/sns.rb', line 13 def (span, params) topic_arn = params[:topic_arn] topic_name = params[:name] if topic_arn # example topic_arn: arn:aws:sns:us-west-2:123456789012:my-topic-name parts = topic_arn.split(':') topic_name = parts[-1] aws_account = parts[-2] span.set_tag(Aws::Ext::TAG_AWS_ACCOUNT, aws_account) end span.set_tag(Aws::Ext::TAG_TOPIC_NAME, topic_name) end |