instana 1.193.5 → 1.195.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +20 -2
- data/Appraisals +17 -1
- data/docker-compose.yml +20 -0
- data/gemfiles/aws_30.gemfile +21 -0
- data/gemfiles/excon_021.gemfile +18 -0
- data/gemfiles/excon_079.gemfile +18 -0
- data/gemfiles/shoryuken_50.gemfile +19 -0
- data/lib/instana/activators/aws_sdk_dynamodb.rb +20 -0
- data/lib/instana/activators/aws_sdk_s3.rb +20 -0
- data/lib/instana/activators/aws_sdk_sns.rb +20 -0
- data/lib/instana/activators/aws_sdk_sqs.rb +20 -0
- data/lib/instana/activators/excon.rb +1 -1
- data/lib/instana/activators/shoryuken.rb +24 -0
- data/lib/instana/config.rb +3 -0
- data/lib/instana/instrumentation/aws_sdk_dynamodb.rb +48 -0
- data/lib/instana/instrumentation/aws_sdk_s3.rb +55 -0
- data/lib/instana/instrumentation/aws_sdk_sns.rb +29 -0
- data/lib/instana/instrumentation/aws_sdk_sqs.rb +98 -0
- data/lib/instana/instrumentation/excon.rb +10 -4
- data/lib/instana/instrumentation/instrumented_request.rb +64 -7
- data/lib/instana/instrumentation/net-http.rb +10 -3
- data/lib/instana/instrumentation/rack.rb +35 -15
- data/lib/instana/instrumentation/shoryuken.rb +44 -0
- data/lib/instana/instrumentation/sidekiq-client.rb +1 -1
- data/lib/instana/instrumentation/sidekiq-worker.rb +1 -1
- data/lib/instana/secrets.rb +2 -2
- data/lib/instana/tracer.rb +14 -11
- data/lib/instana/tracing/span.rb +9 -3
- data/lib/instana/tracing/span_context.rb +25 -1
- data/lib/instana/version.rb +1 -1
- data/test/instrumentation/aws_test.rb +161 -0
- data/test/instrumentation/excon_test.rb +1 -0
- data/test/instrumentation/net_http_test.rb +18 -0
- data/test/instrumentation/rack_instrumented_request_test.rb +50 -3
- data/test/instrumentation/rack_test.rb +141 -0
- data/test/instrumentation/shoryuken_test.rb +47 -0
- data/test/tracing/opentracing_test.rb +3 -3
- metadata +21 -3
- data/Dockerfile +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3c25ac47f1cf483842987544cbabbb789f6b970ac6eacf6e98aa775dcd17a30
|
4
|
+
data.tar.gz: 2f5dd56ca03c8a676ab9748e261502667e6f76e01074aff5e5fc63543f12a076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d03380277adfd468ed0ed73ae646c552cdcc4675eb6e6ffc6e83beff9e17b2d18d5c08a5815115d170503b50bf86a876366ddb793e9e7fa1914e1c0559d089e
|
7
|
+
data.tar.gz: 5cca053e9833421b31264fa4d9d46f5a8dea6150e47d260f711712390bb51d6bb8ada2a0abad4144f2159919b15b34b318204c44cc90870ebba32f3bb76bfdaf
|
data/.circleci/config.yml
CHANGED
@@ -10,6 +10,11 @@ executors:
|
|
10
10
|
DATABASE_URL: 'sqlite3::memory:'
|
11
11
|
- image: memcached
|
12
12
|
- image: redis
|
13
|
+
- image: circleci/dynamodb
|
14
|
+
- image: minio/minio:latest
|
15
|
+
command: ["server", "/data"]
|
16
|
+
- image: s12v/sns
|
17
|
+
- image: softwaremill/elasticmq-native
|
13
18
|
ruby_26:
|
14
19
|
docker:
|
15
20
|
- image: circleci/ruby:2.6-node
|
@@ -19,6 +24,11 @@ executors:
|
|
19
24
|
DATABASE_URL: 'sqlite3::memory:'
|
20
25
|
- image: memcached
|
21
26
|
- image: redis
|
27
|
+
- image: circleci/dynamodb
|
28
|
+
- image: minio/minio:latest
|
29
|
+
command: ["server", "/data"]
|
30
|
+
- image: s12v/sns
|
31
|
+
- image: softwaremill/elasticmq-native
|
22
32
|
ruby_27:
|
23
33
|
docker:
|
24
34
|
- image: circleci/ruby:2.7-node
|
@@ -28,6 +38,11 @@ executors:
|
|
28
38
|
DATABASE_URL: 'sqlite3::memory:'
|
29
39
|
- image: memcached
|
30
40
|
- image: redis
|
41
|
+
- image: circleci/dynamodb
|
42
|
+
- image: minio/minio:latest
|
43
|
+
command: ["server", "/data"]
|
44
|
+
- image: s12v/sns
|
45
|
+
- image: softwaremill/elasticmq-native
|
31
46
|
ruby_25_mysql2:
|
32
47
|
docker:
|
33
48
|
- image: circleci/ruby:2.5-node
|
@@ -156,10 +171,10 @@ jobs:
|
|
156
171
|
parameters:
|
157
172
|
stack:
|
158
173
|
type: executor
|
159
|
-
default:
|
174
|
+
default: ruby_27
|
160
175
|
gemfile:
|
161
176
|
type: string
|
162
|
-
default: "./gemfiles/
|
177
|
+
default: "./gemfiles/aws_30.gemfile"
|
163
178
|
executor: << parameters.stack >>
|
164
179
|
environment:
|
165
180
|
APPRAISAL_INITIALIZED: "1"
|
@@ -196,9 +211,11 @@ workflows:
|
|
196
211
|
- ruby_26
|
197
212
|
- ruby_25
|
198
213
|
gemfile:
|
214
|
+
- "./gemfiles/aws_30.gemfile"
|
199
215
|
- "./gemfiles/cuba_30.gemfile"
|
200
216
|
- "./gemfiles/dalli_20.gemfile"
|
201
217
|
- "./gemfiles/excon_02.gemfile"
|
218
|
+
- "./gemfiles/excon_079.gemfile"
|
202
219
|
- "./gemfiles/graphql_10.gemfile"
|
203
220
|
- "./gemfiles/grpc_10.gemfile"
|
204
221
|
- "./gemfiles/net_http_01.gemfile"
|
@@ -214,6 +231,7 @@ workflows:
|
|
214
231
|
- "./gemfiles/sidekiq_42.gemfile"
|
215
232
|
- "./gemfiles/sidekiq_50.gemfile"
|
216
233
|
- "./gemfiles/sinatra_14.gemfile"
|
234
|
+
- "./gemfiles/shoryuken_50.gemfile"
|
217
235
|
rails:
|
218
236
|
jobs:
|
219
237
|
- test_apprisal:
|
data/Appraisals
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# (c) Copyright IBM Corp. 2021
|
2
2
|
# (c) Copyright Instana Inc. 2021
|
3
3
|
|
4
|
+
appraise 'aws-30' do
|
5
|
+
gem 'aws-sdk-dynamodb', '~> 1.59'
|
6
|
+
gem 'aws-sdk-s3', '~> 1.59'
|
7
|
+
gem 'aws-sdk-sns', '~> 1.38'
|
8
|
+
gem 'aws-sdk-sqs', '~> 1.36'
|
9
|
+
end
|
10
|
+
|
4
11
|
appraise 'cuba-30' do
|
5
12
|
gem 'cuba', '>= 3.0', '< 4.0'
|
6
13
|
end
|
@@ -9,10 +16,14 @@ appraise 'dalli-20' do
|
|
9
16
|
gem 'dalli', '>= 2.0', '< 3.0'
|
10
17
|
end
|
11
18
|
|
12
|
-
appraise 'excon-
|
19
|
+
appraise 'excon-021' do
|
13
20
|
gem 'excon', '>= 0.21.0', '< 1.0'
|
14
21
|
end
|
15
22
|
|
23
|
+
appraise 'excon-079' do
|
24
|
+
gem 'excon', '>= 0.79.0', '< 1.0'
|
25
|
+
end
|
26
|
+
|
16
27
|
appraise 'grpc-10' do
|
17
28
|
gem 'grpc', '>= 1.0', '< 2.0'
|
18
29
|
end
|
@@ -94,6 +105,11 @@ appraise 'sinatra-14' do
|
|
94
105
|
gem 'sinatra', '1.4.7'
|
95
106
|
end
|
96
107
|
|
108
|
+
appraise 'shoryuken-50' do
|
109
|
+
gem 'shoryuken', '~> 5.2'
|
110
|
+
gem 'aws-sdk-sqs', '~> 1.36'
|
111
|
+
end
|
112
|
+
|
97
113
|
appraise 'sidekiq-42' do
|
98
114
|
gem 'sidekiq', '~> 4.2.10'
|
99
115
|
end
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
version: '3'
|
2
|
+
services:
|
3
|
+
sns:
|
4
|
+
image: s12v/sns
|
5
|
+
ports:
|
6
|
+
- "9911:9911"
|
7
|
+
s3:
|
8
|
+
image: minio/minio:latest
|
9
|
+
command: ["server", "/data"]
|
10
|
+
ports:
|
11
|
+
- "9000:9000"
|
12
|
+
dynamodb:
|
13
|
+
image: circleci/dynamodb
|
14
|
+
ports:
|
15
|
+
- "8000:8000"
|
16
|
+
sqs:
|
17
|
+
image: softwaremill/elasticmq-native
|
18
|
+
ports:
|
19
|
+
- "9324:9324"
|
20
|
+
- "9325:9325"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
# (c) Copyright IBM Corp. 2021
|
4
|
+
# (c) Copyright Instana Inc. 2021
|
5
|
+
|
6
|
+
source "https://rubygems.org"
|
7
|
+
|
8
|
+
gem "rake"
|
9
|
+
gem "minitest", "5.9.1"
|
10
|
+
gem "minitest-reporters"
|
11
|
+
gem "webmock"
|
12
|
+
gem "puma"
|
13
|
+
gem "rubocop", "~> 1.9"
|
14
|
+
gem "rack-test"
|
15
|
+
gem "simplecov", "~> 0.21.2"
|
16
|
+
gem "aws-sdk-dynamodb", "~> 1.59"
|
17
|
+
gem "aws-sdk-s3", "~> 1.59"
|
18
|
+
gem "aws-sdk-sns", "~> 1.38"
|
19
|
+
gem "aws-sdk-sqs", "~> 1.36"
|
20
|
+
|
21
|
+
gemspec path: "../"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
# (c) Copyright IBM Corp. 2021
|
4
|
+
# (c) Copyright Instana Inc. 2021
|
5
|
+
|
6
|
+
source "https://rubygems.org"
|
7
|
+
|
8
|
+
gem "rake"
|
9
|
+
gem "minitest", "5.9.1"
|
10
|
+
gem "minitest-reporters"
|
11
|
+
gem "webmock"
|
12
|
+
gem "puma"
|
13
|
+
gem "rubocop", "~> 1.9"
|
14
|
+
gem "rack-test"
|
15
|
+
gem "simplecov", "~> 0.21.2"
|
16
|
+
gem "excon", ">= 0.21.0", "< 1.0"
|
17
|
+
|
18
|
+
gemspec path: "../"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
# (c) Copyright IBM Corp. 2021
|
4
|
+
# (c) Copyright Instana Inc. 2021
|
5
|
+
|
6
|
+
source "https://rubygems.org"
|
7
|
+
|
8
|
+
gem "rake"
|
9
|
+
gem "minitest", "5.9.1"
|
10
|
+
gem "minitest-reporters"
|
11
|
+
gem "webmock"
|
12
|
+
gem "puma"
|
13
|
+
gem "rubocop", "~> 1.9"
|
14
|
+
gem "rack-test"
|
15
|
+
gem "simplecov", "~> 0.21.2"
|
16
|
+
gem "excon", ">= 0.79.0", "< 1.0"
|
17
|
+
|
18
|
+
gemspec path: "../"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
# (c) Copyright IBM Corp. 2021
|
4
|
+
# (c) Copyright Instana Inc. 2021
|
5
|
+
|
6
|
+
source "https://rubygems.org"
|
7
|
+
|
8
|
+
gem "rake"
|
9
|
+
gem "minitest", "5.9.1"
|
10
|
+
gem "minitest-reporters"
|
11
|
+
gem "webmock"
|
12
|
+
gem "puma"
|
13
|
+
gem "rubocop", "~> 1.9"
|
14
|
+
gem "rack-test"
|
15
|
+
gem "simplecov", "~> 0.21.2"
|
16
|
+
gem "shoryuken", "~> 5.2"
|
17
|
+
gem "aws-sdk-sqs", "~> 1.36"
|
18
|
+
|
19
|
+
gemspec path: "../"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
4
|
+
module Instana
|
5
|
+
module Activators
|
6
|
+
class AwsDynamoDB < Activator
|
7
|
+
def can_instrument?
|
8
|
+
defined?(Aws::DynamoDB::Client)
|
9
|
+
end
|
10
|
+
|
11
|
+
def instrument
|
12
|
+
require 'instana/instrumentation/aws_sdk_dynamodb'
|
13
|
+
|
14
|
+
::Aws::DynamoDB::Client.add_plugin(Instana::Instrumentation::DynamoDB)
|
15
|
+
|
16
|
+
true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
4
|
+
module Instana
|
5
|
+
module Activators
|
6
|
+
class AwsS3 < Activator
|
7
|
+
def can_instrument?
|
8
|
+
defined?(Aws::S3::Client)
|
9
|
+
end
|
10
|
+
|
11
|
+
def instrument
|
12
|
+
require 'instana/instrumentation/aws_sdk_s3'
|
13
|
+
|
14
|
+
::Aws::S3::Client.add_plugin(Instana::Instrumentation::S3)
|
15
|
+
|
16
|
+
true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
4
|
+
module Instana
|
5
|
+
module Activators
|
6
|
+
class AwsSdkSns < Activator
|
7
|
+
def can_instrument?
|
8
|
+
defined?(Aws::SNS::Client)
|
9
|
+
end
|
10
|
+
|
11
|
+
def instrument
|
12
|
+
require 'instana/instrumentation/aws_sdk_sns'
|
13
|
+
|
14
|
+
::Aws::SNS::Client.add_plugin(Instana::Instrumentation::SNS)
|
15
|
+
|
16
|
+
true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
4
|
+
module Instana
|
5
|
+
module Activators
|
6
|
+
class AwsSdkSqs < Activator
|
7
|
+
def can_instrument?
|
8
|
+
defined?(Aws::SQS::Client)
|
9
|
+
end
|
10
|
+
|
11
|
+
def instrument
|
12
|
+
require 'instana/instrumentation/aws_sdk_sqs'
|
13
|
+
|
14
|
+
::Aws::SQS::Client.add_plugin(Instana::Instrumentation::SQS)
|
15
|
+
|
16
|
+
true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -5,7 +5,7 @@ module Instana
|
|
5
5
|
module Activators
|
6
6
|
class Excon < Activator
|
7
7
|
def can_instrument?
|
8
|
-
defined?(::Excon) && Instana.config[:excon][:enabled]
|
8
|
+
defined?(::Excon) && defined?(::Excon::Middleware::Base) && ::Excon.respond_to?(:defaults) && Instana.config[:excon][:enabled]
|
9
9
|
end
|
10
10
|
|
11
11
|
def instrument
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
4
|
+
module Instana
|
5
|
+
module Activators
|
6
|
+
class Shoryuken < Activator
|
7
|
+
def can_instrument?
|
8
|
+
defined?(::Shoryuken) && ::Shoryuken.respond_to?(:configure_server)
|
9
|
+
end
|
10
|
+
|
11
|
+
def instrument
|
12
|
+
require 'instana/instrumentation/shoryuken'
|
13
|
+
|
14
|
+
::Shoryuken.configure_server do |config|
|
15
|
+
config.server_middleware do |chain|
|
16
|
+
chain.add ::Instana::Instrumentation::Shoryuken
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/instana/config.rb
CHANGED
@@ -55,6 +55,9 @@ module Instana
|
|
55
55
|
# ::Instana.config[:sanitize_sql] = false
|
56
56
|
@config[:sanitize_sql] = true
|
57
57
|
|
58
|
+
# W3 Trace Context Support
|
59
|
+
@config[:w3_trace_correlation] = ENV.fetch('INSTANA_W3C_TRACE_CORRELATION', 'true').eql?('true')
|
60
|
+
|
58
61
|
@config[:action_controller] = { :enabled => true }
|
59
62
|
@config[:action_view] = { :enabled => true }
|
60
63
|
@config[:active_record] = { :enabled => true }
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
4
|
+
module Instana
|
5
|
+
module Instrumentation
|
6
|
+
class DynamoDB < Seahorse::Client::Plugin
|
7
|
+
class Handler < Seahorse::Client::Handler
|
8
|
+
def call(context)
|
9
|
+
dynamo_tags = {
|
10
|
+
op: format_operation(context.operation_name),
|
11
|
+
table: table_name_from(context)
|
12
|
+
}
|
13
|
+
|
14
|
+
::Instana.tracer.trace(:dynamodb, {dynamodb: dynamo_tags}) { @handler.call(context) }
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def table_name_from(context)
|
20
|
+
context.params[:table_name] || context.params[:global_table_name] || 'Unknown'
|
21
|
+
end
|
22
|
+
|
23
|
+
def format_operation(name)
|
24
|
+
case name
|
25
|
+
when :create_table
|
26
|
+
'create'
|
27
|
+
when :list_tables
|
28
|
+
'list'
|
29
|
+
when :get_item
|
30
|
+
'get'
|
31
|
+
when :put_item
|
32
|
+
'put'
|
33
|
+
when :update_item
|
34
|
+
'update'
|
35
|
+
when :delete_item
|
36
|
+
'delete'
|
37
|
+
else
|
38
|
+
name.to_s
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def add_handlers(handlers, _config)
|
44
|
+
handlers.add(Handler, step: :initialize)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
4
|
+
module Instana
|
5
|
+
module Instrumentation
|
6
|
+
class S3 < Seahorse::Client::Plugin
|
7
|
+
class Handler < Seahorse::Client::Handler
|
8
|
+
def call(context)
|
9
|
+
s3_tags = {
|
10
|
+
op: format_operation(context.operation_name),
|
11
|
+
bucket: bucket_name_from(context),
|
12
|
+
key: key_from_context(context)
|
13
|
+
}.compact
|
14
|
+
|
15
|
+
::Instana.tracer.trace(:s3, {s3: s3_tags}) { @handler.call(context) }
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def bucket_name_from(context)
|
21
|
+
context.params[:bucket] || 'Unknown'
|
22
|
+
end
|
23
|
+
|
24
|
+
def key_from_context(context)
|
25
|
+
context.params[:key]
|
26
|
+
end
|
27
|
+
|
28
|
+
def format_operation(name)
|
29
|
+
case name
|
30
|
+
when :create_bucket
|
31
|
+
'createBucket'
|
32
|
+
when :delete_bucket
|
33
|
+
'deleteBucket'
|
34
|
+
when :delete_object
|
35
|
+
'delete'
|
36
|
+
when :get_object
|
37
|
+
'get'
|
38
|
+
when :head_object
|
39
|
+
'metadata'
|
40
|
+
when :list_objects
|
41
|
+
'list'
|
42
|
+
when :put_object
|
43
|
+
'list'
|
44
|
+
else
|
45
|
+
name.to_s
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def add_handlers(handlers, _config)
|
51
|
+
handlers.add(Handler, step: :initialize)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|