instana 1.211.0 → 1.213.0
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 +36 -5
- data/Gemfile +0 -2
- data/README.md +3 -7
- data/Rakefile +21 -2
- data/download.sh +85 -0
- data/gemfiles/aws_30.gemfile +0 -2
- data/gemfiles/aws_60.gemfile +0 -2
- data/gemfiles/cuba_30.gemfile +0 -2
- data/gemfiles/cuba_40.gemfile +0 -2
- data/gemfiles/dalli_20.gemfile +0 -2
- data/gemfiles/dalli_30.gemfile +0 -2
- data/gemfiles/dalli_32.gemfile +0 -2
- data/gemfiles/excon_02.gemfile +0 -2
- data/gemfiles/excon_021.gemfile +0 -2
- data/gemfiles/excon_079.gemfile +0 -2
- data/gemfiles/excon_100.gemfile +0 -2
- data/gemfiles/graphql_10.gemfile +0 -2
- data/gemfiles/graphql_20.gemfile +0 -2
- data/gemfiles/grpc_10.gemfile +0 -2
- data/gemfiles/mongo_216.gemfile +0 -2
- data/gemfiles/mongo_219.gemfile +0 -2
- data/gemfiles/net_http_01.gemfile +0 -2
- data/gemfiles/rack_16.gemfile +0 -2
- data/gemfiles/rack_20.gemfile +0 -2
- data/gemfiles/rack_30.gemfile +0 -2
- data/gemfiles/rails_42.gemfile +0 -2
- data/gemfiles/rails_50.gemfile +0 -2
- data/gemfiles/rails_52.gemfile +0 -2
- data/gemfiles/rails_60.gemfile +0 -2
- data/gemfiles/rails_61.gemfile +0 -2
- data/gemfiles/rails_70.gemfile +1 -3
- data/gemfiles/rails_71.gemfile +17 -0
- data/gemfiles/redis_40.gemfile +0 -2
- data/gemfiles/resque_122.gemfile +0 -2
- data/gemfiles/resque_20.gemfile +0 -2
- data/gemfiles/rest_client_16.gemfile +0 -2
- data/gemfiles/rest_client_20.gemfile +0 -2
- data/gemfiles/roda_20.gemfile +0 -2
- data/gemfiles/roda_30.gemfile +0 -2
- data/gemfiles/shoryuken_50.gemfile +0 -2
- data/gemfiles/shoryuken_60.gemfile +0 -2
- data/gemfiles/sidekiq_42.gemfile +0 -2
- data/gemfiles/sidekiq_50.gemfile +1 -3
- data/gemfiles/sidekiq_60.gemfile +1 -3
- data/gemfiles/sidekiq_65.gemfile +13 -0
- data/gemfiles/sidekiq_70.gemfile +1 -3
- data/gemfiles/sinatra_14.gemfile +0 -2
- data/gemfiles/sinatra_22.gemfile +0 -2
- data/gemfiles/sinatra_30.gemfile +0 -2
- data/instana.gemspec +2 -2
- data/lib/instana/activators/sidekiq_client.rb +1 -2
- data/lib/instana/activators/sidekiq_worker.rb +1 -2
- data/lib/instana/instrumentation/aws_sdk_lambda.rb +8 -2
- data/lib/instana/instrumentation/excon.rb +1 -1
- data/lib/instana/instrumentation/net-http.rb +1 -1
- data/lib/instana/instrumentation/rack.rb +1 -1
- data/lib/instana/instrumentation/sidekiq-client.rb +11 -2
- data/lib/instana/instrumentation/sidekiq-worker.rb +11 -2
- data/lib/instana/serverless.rb +3 -1
- data/lib/instana/version.rb +1 -1
- data/test/backend/host_agent_reporting_observer_test.rb +5 -3
- data/test/instrumentation/aws_test.rb +44 -0
- data/test/instrumentation/rails_action_controller_test.rb +5 -1
- data/test/instrumentation/rails_action_view_test.rb +5 -1
- data/test/instrumentation/rails_active_record_database_missing_test.rb +5 -3
- data/test/instrumentation/sidekiq-client_test.rb +2 -18
- data/test/instrumentation/sidekiq-worker_test.rb +3 -45
- data/test/support/apps/sidekiq/worker.rb +8 -8
- data/test/test_helper.rb +2 -1
- metadata +9 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '05836c47722da3d9ac443f6f04dffb36ba2e61d89101292a53190956214069ed'
|
|
4
|
+
data.tar.gz: b609e6a9824dacc3ead219e81af2d5edbcb76ddc497fbecaa54aaef835794305
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a52403d7b5e9fec5e7a5b5aee7c8aa67771f939cd4934e4d0279bc1439b4e6bf6b2fa04a609b1f468e21e92f94d731acf33d66b978a681a246c5f87915b96493
|
|
7
|
+
data.tar.gz: 2c9ebd03347c9fd62daa8582a8d56266c905dc6d8f5c27d5d02711bf2318ac8f70878084f77937fa3cc59c89a3668e6b000400e8c5daddb78e91a460b011b976
|
data/.circleci/config.yml
CHANGED
|
@@ -29,6 +29,7 @@ library_gemfile: &library_gemfile
|
|
|
29
29
|
- "./gemfiles/sidekiq_42.gemfile"
|
|
30
30
|
- "./gemfiles/sidekiq_50.gemfile"
|
|
31
31
|
- "./gemfiles/sidekiq_60.gemfile"
|
|
32
|
+
- "./gemfiles/sidekiq_65.gemfile"
|
|
32
33
|
- "./gemfiles/sidekiq_70.gemfile"
|
|
33
34
|
- "./gemfiles/sinatra_14.gemfile"
|
|
34
35
|
- "./gemfiles/sinatra_22.gemfile"
|
|
@@ -211,33 +212,55 @@ commands:
|
|
|
211
212
|
bundler --version
|
|
212
213
|
bundle config set path './vendor/bundle'
|
|
213
214
|
- run:
|
|
214
|
-
name: Install
|
|
215
|
+
name: Install Dependencies
|
|
215
216
|
command: |
|
|
216
217
|
bundle check || bundle install
|
|
217
218
|
run_sonarqube:
|
|
218
219
|
steps:
|
|
219
220
|
- run:
|
|
220
|
-
name: Install Java
|
|
221
|
+
name: Install Java for the SonarQube tool
|
|
221
222
|
command: |
|
|
222
223
|
sudo apt-get update
|
|
223
224
|
sudo apt-get install openjdk-11-jdk
|
|
225
|
+
- run:
|
|
226
|
+
name: Install dependencies for coverage merge
|
|
227
|
+
command: |
|
|
228
|
+
bundler --version
|
|
229
|
+
bundle config set path './vendor/bundle'
|
|
230
|
+
bundle check || bundle install
|
|
231
|
+
environment:
|
|
232
|
+
BUNDLE_GEMFILE: './Gemfile'
|
|
233
|
+
- run:
|
|
234
|
+
name: Fetching partial coverage reports from workflow jobs
|
|
235
|
+
command: |
|
|
236
|
+
./download.sh
|
|
237
|
+
- run:
|
|
238
|
+
name: Merging partial coverage reports for reporting
|
|
239
|
+
command: |
|
|
240
|
+
bundle exec rake coverage:merge_reports --trace
|
|
241
|
+
environment:
|
|
242
|
+
BUNDLE_GEMFILE: './Gemfile'
|
|
224
243
|
- run:
|
|
225
244
|
name: Run SonarQube to capture coverage
|
|
226
245
|
command: |
|
|
227
|
-
wget -O /tmp/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.
|
|
246
|
+
wget -O /tmp/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.8.1.3023.zip
|
|
228
247
|
unzip -d /tmp /tmp/sonar-scanner-cli.zip
|
|
229
248
|
if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
|
|
230
|
-
/tmp/sonar-scanner-4.
|
|
249
|
+
/tmp/sonar-scanner-4.8.1.3023/bin/sonar-scanner \
|
|
231
250
|
-Dsonar.host.url="${SONARQUBE_URL}" \
|
|
232
251
|
-Dsonar.login="${SONARQUBE_LOGIN}" \
|
|
233
252
|
-Dsonar.pullrequest.key="${CIRCLE_PR_NUMBER}" \
|
|
234
253
|
-Dsonar.pullrequest.branch="${CIRCLE_BRANCH}"
|
|
235
254
|
else
|
|
236
|
-
/tmp/sonar-scanner-4.
|
|
255
|
+
/tmp/sonar-scanner-4.8.1.3023/bin/sonar-scanner \
|
|
237
256
|
-Dsonar.host.url="${SONARQUBE_URL}" \
|
|
238
257
|
-Dsonar.login="${SONARQUBE_LOGIN}" \
|
|
239
258
|
-Dsonar.branch.name="${CIRCLE_BRANCH}"
|
|
240
259
|
fi
|
|
260
|
+
- store_artifacts:
|
|
261
|
+
path: partial_coverage_results
|
|
262
|
+
- store_artifacts:
|
|
263
|
+
path: coverage
|
|
241
264
|
run_tests:
|
|
242
265
|
steps:
|
|
243
266
|
- run:
|
|
@@ -301,6 +324,10 @@ jobs:
|
|
|
301
324
|
- checkout
|
|
302
325
|
- setup
|
|
303
326
|
- run_rubocop
|
|
327
|
+
report_coverage:
|
|
328
|
+
executor: ruby_32
|
|
329
|
+
steps:
|
|
330
|
+
- checkout
|
|
304
331
|
- run_sonarqube
|
|
305
332
|
publish:
|
|
306
333
|
executor: ruby_27
|
|
@@ -397,3 +424,7 @@ workflows:
|
|
|
397
424
|
gemfile:
|
|
398
425
|
- "./gemfiles/rails_61.gemfile"
|
|
399
426
|
- "./gemfiles/rails_70.gemfile"
|
|
427
|
+
- "./gemfiles/rails_71.gemfile"
|
|
428
|
+
report_coverage:
|
|
429
|
+
jobs:
|
|
430
|
+
- report_coverage
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<img src="https://disznc.s3.amazonaws.com/Ruby-Dashboard-2020-02-10-at-2.31.36-PM.png"/>
|
|
3
|
-
</div>
|
|
4
|
-
|
|
5
1
|
# Instana
|
|
6
2
|
|
|
7
3
|
The `instana` gem provides Ruby metrics and traces (request, queue & cross-host) for [Instana](https://www.instana.com/).
|
|
@@ -46,15 +42,15 @@ The `instana` gem is a zero configuration tool that will automatically collect k
|
|
|
46
42
|
|
|
47
43
|
## Configuration
|
|
48
44
|
|
|
49
|
-
Although the gem has no configuration required for out of the box metrics and tracing, components can be configured if needed. See our [Configuration](https://
|
|
45
|
+
Although the gem has no configuration required for out of the box metrics and tracing, components can be configured if needed. See our [Configuration](https://www.ibm.com/docs/en/instana-observability/current?topic=ruby-configuration-configuring-instana-gem) page.
|
|
50
46
|
|
|
51
47
|
## Tracing
|
|
52
48
|
|
|
53
|
-
This Ruby gem provides a simple API for tracing and also supports [OpenTracing](http://opentracing.io/). See the [Ruby Tracing SDK](https://
|
|
49
|
+
This Ruby gem provides a simple API for tracing and also supports [OpenTracing](http://opentracing.io/). See the [Ruby Tracing SDK](https://www.ibm.com/docs/en/instana-observability/current?topic=ruby-tracing-sdk) and [OpenTracing](https://www.ibm.com/docs/en/instana-observability/current?topic=ruby-opentracing) pages for details.
|
|
54
50
|
|
|
55
51
|
## Documentation
|
|
56
52
|
|
|
57
|
-
You can find more documentation covering supported components and minimum versions in the Instana [documentation portal](https://
|
|
53
|
+
You can find more documentation covering supported components and minimum versions in the Instana [documentation portal](https://www.ibm.com/docs/en/instana-observability/current?topic=technologies-monitoring-ruby).
|
|
58
54
|
|
|
59
55
|
## Want End User Monitoring (EUM)?
|
|
60
56
|
|
data/Rakefile
CHANGED
|
@@ -13,11 +13,11 @@ Rake::TestTask.new(:test) do |t|
|
|
|
13
13
|
|
|
14
14
|
t.libs << "test"
|
|
15
15
|
t.libs << "lib"
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
if ENV['APPRAISAL_INITIALIZED']
|
|
18
18
|
appraised_group = File.basename(ENV['BUNDLE_GEMFILE']).split(/_[0-9]+\./).first
|
|
19
19
|
suite_files = Dir['test/{instrumentation,frameworks}/*_test.rb']
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
t.test_files = suite_files.select { |f| File.basename(f).start_with?(appraised_group) }
|
|
22
22
|
else
|
|
23
23
|
t.test_files = Dir[
|
|
@@ -27,4 +27,23 @@ Rake::TestTask.new(:test) do |t|
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
namespace :coverage do
|
|
31
|
+
task :merge_reports do
|
|
32
|
+
require 'simplecov'
|
|
33
|
+
require 'simplecov_json_formatter'
|
|
34
|
+
|
|
35
|
+
SimpleCov.start do
|
|
36
|
+
enable_coverage :branch
|
|
37
|
+
SimpleCov.collate Dir["partial_coverage_results/.resultset-*.json"] do
|
|
38
|
+
formatter SimpleCov::Formatter::MultiFormatter.new(
|
|
39
|
+
[
|
|
40
|
+
SimpleCov::Formatter::SimpleFormatter,
|
|
41
|
+
SimpleCov::Formatter::JSONFormatter
|
|
42
|
+
]
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
30
49
|
task :default => :test
|
data/download.sh
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
if [[ -z ${CIRCLE_TOKEN} ]]
|
|
4
|
+
then
|
|
5
|
+
echo "ERROR: The CIRCLE_TOKEN variable is missing"
|
|
6
|
+
exit 255
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
PROJECT_SLUG='https://circleci.com/api/v2/project/gh/instana/ruby-sensor'
|
|
10
|
+
PIPELINE_SLUG='https://circleci.com/api/v2/pipeline/'
|
|
11
|
+
WORKFLOW_SLUG='https://circleci.com/api/v2/workflow/'
|
|
12
|
+
|
|
13
|
+
echo "Getting Pipeline ID"
|
|
14
|
+
PIPELINE_ID=$(curl -s \
|
|
15
|
+
-H "Circle-Token: ${CIRCLE_TOKEN}" \
|
|
16
|
+
"${PROJECT_SLUG}/job/${CIRCLE_BUILD_NUM}" \
|
|
17
|
+
| jq -rj '.pipeline.id')
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
echo "Received Pipeline ID is: ${PIPELINE_ID}"
|
|
21
|
+
|
|
22
|
+
echo "Getting Workflows for Pipeline ID"
|
|
23
|
+
WORKFLOW_IDS=$(curl -s \
|
|
24
|
+
-H "Circle-Token: ${CIRCLE_TOKEN}" \
|
|
25
|
+
"${PIPELINE_SLUG}/${PIPELINE_ID}/workflow" \
|
|
26
|
+
| jq -r '.items[] | select(.name!="report_coverage") | .id')
|
|
27
|
+
|
|
28
|
+
echo "Received Workflow IDs are: ${WORKFLOW_IDS}"
|
|
29
|
+
|
|
30
|
+
for workflow_id in ${WORKFLOW_IDS}
|
|
31
|
+
do
|
|
32
|
+
echo "Waiting for workflow ${workflow_id} to finish"
|
|
33
|
+
while true
|
|
34
|
+
do
|
|
35
|
+
STATUS=$(curl -s \
|
|
36
|
+
-H "Circle-Token: ${CIRCLE_TOKEN}" \
|
|
37
|
+
"${WORKFLOW_SLUG}/${workflow_id}" \
|
|
38
|
+
| jq -r '.status')
|
|
39
|
+
if [[ ${STATUS} != "running" && ${STATUS} != "on_hold" ]]
|
|
40
|
+
then
|
|
41
|
+
break
|
|
42
|
+
else
|
|
43
|
+
echo "Workflow ${workflow_id} has not finished yet. Status is: ${STATUS}"
|
|
44
|
+
sleep 10
|
|
45
|
+
fi
|
|
46
|
+
done
|
|
47
|
+
|
|
48
|
+
if [[ "${STATUS}" != "success" ]]
|
|
49
|
+
then
|
|
50
|
+
echo "ERROR: Workflow ${workflow_id} did not succeed! Status is: ${STATUS}"
|
|
51
|
+
exit 254
|
|
52
|
+
else
|
|
53
|
+
echo "Workflow ${workflow_id} has finished successfully! Status is: ${STATUS}"
|
|
54
|
+
fi
|
|
55
|
+
done
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
echo "All workflows have successfully finished, downloading artifacts."
|
|
59
|
+
|
|
60
|
+
mkdir partial_coverage_results
|
|
61
|
+
for workflow_id in ${WORKFLOW_IDS}
|
|
62
|
+
do
|
|
63
|
+
JOB_NUMBERS=$(curl -s \
|
|
64
|
+
-H "Circle-Token: ${CIRCLE_TOKEN}" \
|
|
65
|
+
"${WORKFLOW_SLUG}/${workflow_id}/job" \
|
|
66
|
+
| jq -r '.items[] | .job_number' \
|
|
67
|
+
| tr '\n' ' ')
|
|
68
|
+
|
|
69
|
+
for job in ${JOB_NUMBERS}
|
|
70
|
+
do
|
|
71
|
+
ARTIFACT_DOWNLOAD_LINK=$(curl -s \
|
|
72
|
+
-H "Circle-Token: ${CIRCLE_TOKEN}" \
|
|
73
|
+
"${PROJECT_SLUG}/${job}/artifacts" \
|
|
74
|
+
| jq -r \
|
|
75
|
+
'.items[] | select(.path=="coverage/.resultset.json") | .url')
|
|
76
|
+
#'.items[] | select(.path=="coverage/coverage.json" or .path=="coverage/.resultset.json") | .url')
|
|
77
|
+
curl -s \
|
|
78
|
+
-L \
|
|
79
|
+
-H "Circle-Token: ${CIRCLE_TOKEN}" \
|
|
80
|
+
"${ARTIFACT_DOWNLOAD_LINK}" \
|
|
81
|
+
-o partial_coverage_results/.resultset-${job}.json
|
|
82
|
+
done
|
|
83
|
+
done
|
|
84
|
+
|
|
85
|
+
echo "All artifacts have been successfully downloaded."
|
data/gemfiles/aws_30.gemfile
CHANGED
data/gemfiles/aws_60.gemfile
CHANGED
data/gemfiles/cuba_30.gemfile
CHANGED
data/gemfiles/cuba_40.gemfile
CHANGED
data/gemfiles/dalli_20.gemfile
CHANGED
data/gemfiles/dalli_30.gemfile
CHANGED
data/gemfiles/dalli_32.gemfile
CHANGED
data/gemfiles/excon_02.gemfile
CHANGED
data/gemfiles/excon_021.gemfile
CHANGED
data/gemfiles/excon_079.gemfile
CHANGED
data/gemfiles/excon_100.gemfile
CHANGED
data/gemfiles/graphql_10.gemfile
CHANGED
data/gemfiles/graphql_20.gemfile
CHANGED
data/gemfiles/grpc_10.gemfile
CHANGED
data/gemfiles/mongo_216.gemfile
CHANGED
data/gemfiles/mongo_219.gemfile
CHANGED
data/gemfiles/rack_16.gemfile
CHANGED
data/gemfiles/rack_20.gemfile
CHANGED
data/gemfiles/rack_30.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/rails_61.gemfile
CHANGED
data/gemfiles/rails_70.gemfile
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
|
-
gem "rake"
|
|
6
|
-
gem "minitest", "5.18.1"
|
|
7
5
|
gem "minitest-reporters"
|
|
8
6
|
gem "webmock"
|
|
9
7
|
gem "puma"
|
|
@@ -11,7 +9,7 @@ gem "rubocop", "~> 1.9"
|
|
|
11
9
|
gem "rack-test"
|
|
12
10
|
gem "simplecov", "~> 0.21.2"
|
|
13
11
|
gem "mail", ">= 2.8.1"
|
|
14
|
-
gem "rails", "
|
|
12
|
+
gem "rails", "7.0.8"
|
|
15
13
|
gem "mysql2", "0.5.5"
|
|
16
14
|
gem "pg"
|
|
17
15
|
gem "sqlite3", "~> 1.4"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# (c) Copyright IBM Corp. 2023
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gem "minitest-reporters"
|
|
6
|
+
gem "webmock"
|
|
7
|
+
gem "puma"
|
|
8
|
+
gem "rubocop", "~> 1.9"
|
|
9
|
+
gem "rack-test"
|
|
10
|
+
gem "simplecov", "~> 0.21.2"
|
|
11
|
+
gem "mail", ">= 2.8.1"
|
|
12
|
+
gem "rails", ">= 7.1"
|
|
13
|
+
gem "mysql2", "0.5.5"
|
|
14
|
+
gem "pg"
|
|
15
|
+
gem "sqlite3", "~> 1.4"
|
|
16
|
+
|
|
17
|
+
gemspec path: "../"
|
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