|
621 | 621 | end |
622 | 622 |
|
623 | 623 | # aws-sdk >= (3.1.0)->aws-sdk-kinesis >= (1.45.0) resolves to a different host name |
624 | | - describe '#describe_stream_consumer', if: RUBY_VERSION >= '2.3.0' do |
| 624 | + describe '#describe_stream_consumer' do |
625 | 625 | subject!(:describe_stream_consumer) do |
626 | 626 | client.describe_stream_consumer( |
627 | 627 | stream_arn: 'arn:aws:kinesis:us-east-1:123456789012:stream/my-stream', # required |
|
671 | 671 | .to eq('123456789012.control-kinesis.us-stubbed-1.amazonaws.com') |
672 | 672 | end |
673 | 673 | end |
674 | | - |
675 | | - # aws-sdk <= (3.0.2)->aws-sdk-kinesis >= (1.34.0) resolves to a different host name |
676 | | - describe '#describe_stream_consumer', if: RUBY_VERSION < '2.3.0' do |
677 | | - subject!(:describe_stream_consumer) do |
678 | | - client.describe_stream_consumer( |
679 | | - stream_arn: 'arn:aws:kinesis:us-east-1:123456789012:stream/my-stream', # required |
680 | | - consumer_name: 'cosumerName', # required |
681 | | - consumer_arn: 'consumerArn', # required |
682 | | - ) |
683 | | - end |
684 | | - let(:responses) do |
685 | | - {describe_stream_consumer: { |
686 | | - consumer_description: { |
687 | | - consumer_name: 'John Doe', |
688 | | - consumer_arn: 'consumerArn', |
689 | | - consumer_status: 'CREATING', |
690 | | - consumer_creation_timestamp: Time.new(2023, 3, 31, 12, 30, 0, '-04:00'), |
691 | | - stream_arn: 'streamArn' |
692 | | - } |
693 | | - }} |
694 | | - end |
695 | | - |
696 | | - it_behaves_like 'schema version span' |
697 | | - it_behaves_like 'environment service name', 'DD_TRACE_AWS_SERVICE_NAME' |
698 | | - it_behaves_like 'configured peer service span', 'DD_TRACE_AWS_PEER_SERVICE' |
699 | | - it_behaves_like 'a peer service span' do |
700 | | - let(:peer_service_val) { 'my-stream' } |
701 | | - let(:peer_service_source) { 'streamname' } |
702 | | - end |
703 | | - |
704 | | - it 'generates a span' do |
705 | | - expect(span.name).to eq('aws.command') |
706 | | - expect(span.service).to eq('aws') |
707 | | - expect(span.type).to eq('http') |
708 | | - expect(span.resource).to eq('kinesis.describe_stream_consumer') |
709 | | - expect(span.get_tag('aws.agent')).to eq('aws-sdk-ruby') |
710 | | - expect(span.get_tag('aws.operation')).to eq('describe_stream_consumer') |
711 | | - expect(span.get_tag('region')).to eq('us-stubbed-1') |
712 | | - expect(span.get_tag('aws_service')).to eq('kinesis') |
713 | | - expect(span.get_tag('streamname')).to eq('my-stream') |
714 | | - expect(span.get_tag('path')).to eq('') |
715 | | - expect(span.get_tag('host')).to eq('kinesis.us-stubbed-1.amazonaws.com') |
716 | | - expect(span.get_tag('http.method')).to eq('POST') |
717 | | - expect(span.get_tag('http.status_code')).to eq('200') |
718 | | - expect(span.get_tag('span.kind')).to eq('client') |
719 | | - expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_COMPONENT)).to eq('aws') |
720 | | - expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION)) |
721 | | - .to eq('command') |
722 | | - expect(span.get_tag(Datadog::Tracing::Metadata::Ext::TAG_PEER_HOSTNAME)) |
723 | | - .to eq('kinesis.us-stubbed-1.amazonaws.com') |
724 | | - end |
725 | | - end |
726 | 674 | end |
727 | 675 |
|
728 | 676 | context 'with an eventbridge client' do |
|
0 commit comments