instana 1.193.4 → 1.195.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +20 -2
- data/.rubocop.yml +7 -0
- data/Appraisals +20 -1
- data/Gemfile +3 -0
- data/LICENSE +2 -1
- data/Rakefile +3 -0
- data/benchmarks/10k-rack-traces.rb +3 -0
- data/benchmarks/Gemfile +4 -0
- data/benchmarks/id_generation.rb +4 -0
- data/benchmarks/opentracing.rb +4 -0
- data/benchmarks/rack_vanilla_vs_traced.rb +3 -0
- data/benchmarks/stackprof_rack_tracing.rb +3 -0
- data/benchmarks/time_processing.rb +4 -0
- data/bin/console +3 -0
- data/docker-compose.yml +20 -0
- data/examples/opentracing.rb +4 -0
- data/examples/tracing.rb +4 -0
- data/extras/license_header.rb +44 -0
- data/gemfiles/aws_30.gemfile +21 -0
- data/gemfiles/cuba_30.gemfile +3 -0
- data/gemfiles/dalli_20.gemfile +3 -0
- data/gemfiles/excon_02.gemfile +3 -0
- data/gemfiles/excon_021.gemfile +18 -0
- data/gemfiles/excon_079.gemfile +18 -0
- data/gemfiles/graphql_10.gemfile +3 -0
- data/gemfiles/grpc_10.gemfile +3 -0
- data/gemfiles/net_http_01.gemfile +3 -0
- data/gemfiles/rack_16.gemfile +3 -0
- data/gemfiles/rack_20.gemfile +3 -0
- data/gemfiles/rails_42.gemfile +3 -0
- data/gemfiles/rails_50.gemfile +3 -0
- data/gemfiles/rails_52.gemfile +3 -0
- data/gemfiles/rails_60.gemfile +3 -0
- data/gemfiles/redis_40.gemfile +3 -0
- data/gemfiles/resque_122.gemfile +3 -0
- data/gemfiles/resque_20.gemfile +3 -0
- data/gemfiles/rest_client_16.gemfile +3 -0
- data/gemfiles/rest_client_20.gemfile +3 -0
- data/gemfiles/roda_20.gemfile +3 -0
- data/gemfiles/roda_30.gemfile +3 -0
- data/gemfiles/shoryuken_50.gemfile +19 -0
- data/gemfiles/sidekiq_42.gemfile +3 -0
- data/gemfiles/sidekiq_50.gemfile +3 -0
- data/gemfiles/sinatra_14.gemfile +3 -0
- data/instana.gemspec +4 -0
- data/lib/instana.rb +3 -0
- data/lib/instana/activator.rb +3 -0
- data/lib/instana/activators/action_cable.rb +24 -0
- data/lib/instana/activators/action_controller_api.rb +3 -0
- data/lib/instana/activators/action_controller_base.rb +3 -0
- data/lib/instana/activators/action_view.rb +3 -0
- data/lib/instana/activators/active_record.rb +3 -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/cuba.rb +3 -0
- data/lib/instana/activators/dalli.rb +3 -0
- data/lib/instana/activators/excon.rb +4 -1
- data/lib/instana/activators/graphql.rb +3 -0
- data/lib/instana/activators/grpc_client.rb +3 -0
- data/lib/instana/activators/grpc_server.rb +3 -0
- data/lib/instana/activators/net_http.rb +3 -0
- data/lib/instana/activators/rack.rb +3 -0
- data/lib/instana/activators/rails.rb +3 -0
- data/lib/instana/activators/redis.rb +3 -0
- data/lib/instana/activators/resque_client.rb +3 -0
- data/lib/instana/activators/resque_worker.rb +3 -0
- data/lib/instana/activators/rest_client.rb +3 -0
- data/lib/instana/activators/roda.rb +3 -0
- data/lib/instana/activators/shoryuken.rb +24 -0
- data/lib/instana/activators/sidekiq_client.rb +3 -0
- data/lib/instana/activators/sidekiq_worker.rb +3 -0
- data/lib/instana/activators/sinatra.rb +3 -0
- data/lib/instana/agent.rb +3 -0
- data/lib/instana/agent/helpers.rb +3 -0
- data/lib/instana/agent/hooks.rb +3 -0
- data/lib/instana/agent/tasks.rb +3 -0
- data/lib/instana/base.rb +3 -0
- data/lib/instana/collector.rb +3 -0
- data/lib/instana/collectors/gc.rb +3 -0
- data/lib/instana/collectors/memory.rb +3 -0
- data/lib/instana/collectors/thread.rb +3 -0
- data/lib/instana/config.rb +6 -0
- data/lib/instana/frameworks/cuba.rb +3 -0
- data/lib/instana/frameworks/rails.rb +3 -0
- data/lib/instana/frameworks/roda.rb +3 -0
- data/lib/instana/frameworks/sinatra.rb +3 -0
- data/lib/instana/helpers.rb +3 -0
- data/lib/instana/instrumentation/action_cable.rb +53 -0
- data/lib/instana/instrumentation/action_controller.rb +3 -0
- data/lib/instana/instrumentation/action_view.rb +3 -0
- data/lib/instana/instrumentation/active_record.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/dalli.rb +3 -0
- data/lib/instana/instrumentation/excon.rb +13 -4
- data/lib/instana/instrumentation/graphql.rb +3 -0
- data/lib/instana/instrumentation/grpc.rb +3 -0
- data/lib/instana/instrumentation/instrumented_request.rb +68 -7
- data/lib/instana/instrumentation/net-http.rb +13 -3
- data/lib/instana/instrumentation/rack.rb +38 -15
- data/lib/instana/instrumentation/redis.rb +3 -0
- data/lib/instana/instrumentation/resque.rb +3 -0
- data/lib/instana/instrumentation/rest-client.rb +3 -0
- data/lib/instana/instrumentation/shoryuken.rb +44 -0
- data/lib/instana/instrumentation/sidekiq-client.rb +4 -1
- data/lib/instana/instrumentation/sidekiq-worker.rb +4 -1
- data/lib/instana/opentracing/carrier.rb +3 -0
- data/lib/instana/opentracing/tracer.rb +3 -0
- data/lib/instana/rack.rb +4 -0
- data/lib/instana/secrets.rb +5 -2
- data/lib/instana/setup.rb +3 -0
- data/lib/instana/thread_local.rb +3 -0
- data/lib/instana/tracer.rb +17 -11
- data/lib/instana/tracing/processor.rb +3 -0
- data/lib/instana/tracing/span.rb +12 -3
- data/lib/instana/tracing/span_context.rb +28 -1
- data/lib/instana/util.rb +3 -0
- data/lib/instana/version.rb +4 -1
- data/lib/oj_check.rb +3 -0
- data/lib/opentracing.rb +3 -0
- data/test/activator_test.rb +3 -0
- data/test/agent/agent_test.rb +3 -0
- data/test/benchmarks/bench_id_generation.rb +3 -0
- data/test/benchmarks/bench_opentracing.rb +3 -0
- data/test/config_test.rb +3 -0
- data/test/frameworks/cuba_test.rb +3 -0
- data/test/frameworks/roda_test.rb +4 -0
- data/test/frameworks/sinatra_test.rb +3 -0
- data/test/instana_test.rb +3 -0
- data/test/instrumentation/aws_test.rb +161 -0
- data/test/instrumentation/dalli_test.rb +3 -0
- data/test/instrumentation/excon_test.rb +4 -0
- data/test/instrumentation/graphql_test.rb +3 -0
- data/test/instrumentation/grpc_test.rb +3 -0
- data/test/instrumentation/net_http_test.rb +21 -0
- data/test/instrumentation/rack_instrumented_request_test.rb +53 -3
- data/test/instrumentation/rack_test.rb +144 -0
- data/test/instrumentation/rails_action_cable_test.rb +131 -0
- data/test/instrumentation/rails_action_controller_test.rb +3 -0
- data/test/instrumentation/rails_action_view_test.rb +3 -0
- data/test/instrumentation/rails_active_record_test.rb +3 -2
- data/test/instrumentation/redis_test.rb +3 -0
- data/test/instrumentation/resque_test.rb +3 -0
- data/test/instrumentation/rest_client_test.rb +3 -0
- data/test/instrumentation/shoryuken_test.rb +47 -0
- data/test/instrumentation/sidekiq-client_test.rb +3 -0
- data/test/instrumentation/sidekiq-worker_test.rb +3 -0
- data/test/secrets_test.rb +3 -0
- data/test/support/apps/active_record/active_record.rb +3 -0
- data/test/support/apps/grpc/boot.rb +3 -0
- data/test/support/apps/grpc/grpc_server.rb +3 -0
- data/test/support/apps/http_endpoint/boot.rb +3 -0
- data/test/support/apps/rails/boot.rb +3 -0
- data/test/support/apps/rails/models/block.rb +3 -0
- data/test/support/apps/rails/models/block6.rb +3 -0
- data/test/support/apps/resque/boot.rb +3 -0
- data/test/support/apps/resque/jobs/resque_error_job.rb +3 -0
- data/test/support/apps/resque/jobs/resque_fast_job.rb +3 -0
- data/test/support/apps/sidekiq/boot.rb +4 -0
- data/test/support/apps/sidekiq/jobs/sidekiq_job_1.rb +3 -0
- data/test/support/apps/sidekiq/jobs/sidekiq_job_2.rb +3 -0
- data/test/support/apps/sidekiq/worker.rb +3 -0
- data/test/support/helpers.rb +3 -0
- data/test/test_helper.rb +3 -0
- data/test/tracing/custom_test.rb +3 -0
- data/test/tracing/id_management_test.rb +4 -0
- data/test/tracing/opentracing_test.rb +6 -3
- data/test/tracing/tracer_async_test.rb +3 -0
- data/test/tracing/tracer_test.rb +3 -0
- metadata +26 -3
- data/Dockerfile +0 -16
data/gemfiles/rack_16.gemfile
CHANGED
data/gemfiles/rack_20.gemfile
CHANGED
data/gemfiles/rails_42.gemfile
CHANGED
data/gemfiles/rails_50.gemfile
CHANGED
data/gemfiles/rails_52.gemfile
CHANGED
data/gemfiles/rails_60.gemfile
CHANGED
data/gemfiles/redis_40.gemfile
CHANGED
data/gemfiles/resque_122.gemfile
CHANGED
data/gemfiles/resque_20.gemfile
CHANGED
data/gemfiles/roda_20.gemfile
CHANGED
data/gemfiles/roda_30.gemfile
CHANGED
@@ -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: "../"
|
data/gemfiles/sidekiq_42.gemfile
CHANGED
data/gemfiles/sidekiq_50.gemfile
CHANGED
data/gemfiles/sinatra_14.gemfile
CHANGED
data/instana.gemspec
CHANGED
data/lib/instana.rb
CHANGED
data/lib/instana/activator.rb
CHANGED
@@ -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 ActionCable < Activator
|
7
|
+
def can_instrument?
|
8
|
+
defined?(::ActionCable::Connection::Base) && defined?(::ActionCable::Channel::Base)
|
9
|
+
end
|
10
|
+
|
11
|
+
def instrument
|
12
|
+
require 'instana/instrumentation/action_cable'
|
13
|
+
|
14
|
+
::ActionCable::Connection::Base
|
15
|
+
.prepend(Instana::Instrumentation::ActionCableConnection)
|
16
|
+
|
17
|
+
::ActionCable::Channel::Base
|
18
|
+
.prepend(Instana::Instrumentation::ActionCableChannel)
|
19
|
+
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
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 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
|
@@ -1,8 +1,11 @@
|
|
1
|
+
# (c) Copyright IBM Corp. 2021
|
2
|
+
# (c) Copyright Instana Inc. 2021
|
3
|
+
|
1
4
|
module Instana
|
2
5
|
module Activators
|
3
6
|
class Excon < Activator
|
4
7
|
def can_instrument?
|
5
|
-
defined?(::Excon) && Instana.config[:excon][:enabled]
|
8
|
+
defined?(::Excon) && defined?(::Excon::Middleware::Base) && ::Excon.respond_to?(:defaults) && Instana.config[:excon][:enabled]
|
6
9
|
end
|
7
10
|
|
8
11
|
def instrument
|