Sha256: 740c846297f48e4e61ebc1577680c576816ea7e0faf41c560b459c72e7e4f109

Contents?: true

Size: 864 Bytes

Versions: 28

Compression:

Stored size: 864 Bytes

Contents

# frozen_string_literal: true

require_relative './base'
require_relative '../ext'

module Datadog
  module Tracing
    module Contrib
      module Aws
        module Service
          # Kinesis tag handlers.
          class Kinesis < Base
            def add_tags(span, params)
              stream_arn = params[:stream_arn]
              stream_name = params[:stream_name]

              if stream_arn
                # example stream_arn: arn:aws:kinesis:us-east-1:123456789012:stream/my-stream
                parts = stream_arn.split(':')
                stream_name = parts[-1].split('/')[-1]
                aws_account = parts[-2]
                span.set_tag(Aws::Ext::TAG_AWS_ACCOUNT, aws_account)
              end

              span.set_tag(Aws::Ext::TAG_STREAM_NAME, stream_name)
            end
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
datadog-2.7.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.6.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.5.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.4.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.3.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.2.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.23.3 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.23.2 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.1.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.0.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.23.1 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.0.0.beta2 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.22.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
datadog-2.0.0.beta1 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.21.1 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.21.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.20.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.19.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.18.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb
ddtrace-1.17.0 lib/datadog/tracing/contrib/aws/service/kinesis.rb