instana 1.216.0 → 1.217.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d537c1bb144d87403ff4f77159269e31e8af893fd31f6c942d5d6c00a2f89a4a
4
- data.tar.gz: 81d978a21bd5bd84c1305851a34570a20c69dd794ccaef7081490db78037c5d4
3
+ metadata.gz: 93a8af58226aa905f51dfa17ead848e26e7fab57b3d605849a6255fb74787e79
4
+ data.tar.gz: 86af2549a8380102a88f383d139678a2e47b349e71947721476e14211e5942c0
5
5
  SHA512:
6
- metadata.gz: 423d36b04c2e7b6035b566d0bd9617dfd9c2d7700e8d0c8ae934ce2631703cdc4e875ac73a64b136aed2f511a07bb5cfdd257c881a293a2cb85b66bc1d347bd9
7
- data.tar.gz: ef472837810e93803daef7776c0b0e664093ddb72cb44f149be2798c9f8ddc0d26eeefe25a9d01a5114e42fb578d050ddc75e03470d1735d1d34eecd5226baa5
6
+ metadata.gz: d3393c184331fa59069375678300b463fd038cca1c2996f95e416723690f1f119f0d4940af90997161278649d6353ae0e28ae03b2791126bcaa42bd32cf3a06d
7
+ data.tar.gz: f246ad9e3c63431aab1a244fbb88e7e1146ec91c35749253b7630e9fc5032a91b0db14b86ae091dca9f3a2c462cb8f0a1c0fcc53aaec0e9feb9516dcb5d7657c
data/.circleci/config.yml CHANGED
@@ -10,6 +10,7 @@ library_gemfile: &library_gemfile
10
10
  - "./gemfiles/dalli_30.gemfile"
11
11
  - "./gemfiles/dalli_32.gemfile"
12
12
  - "./gemfiles/excon_079.gemfile"
13
+ - "./gemfiles/excon_0100.gemfile"
13
14
  - "./gemfiles/excon_100.gemfile"
14
15
  - "./gemfiles/graphql_10.gemfile"
15
16
  - "./gemfiles/graphql_20.gemfile"
@@ -185,7 +186,7 @@ executors:
185
186
  POSTGRES_DB: 'ci_test'
186
187
  ruby_34:
187
188
  docker:
188
- - image: ruby:3.4.0-preview1-bookworm
189
+ - image: ruby:3.4.0-preview2-bookworm
189
190
  environment:
190
191
  MEMCACHED_HOST: '127.0.0.1:11211'
191
192
  REDIS_URL: 'redis://127.0.0.1:6379'
@@ -200,7 +201,7 @@ executors:
200
201
  - image: mongo:5-focal
201
202
  ruby_34_mysql2:
202
203
  docker:
203
- - image: ruby:3.4.0-preview1-bookworm
204
+ - image: ruby:3.4.0-preview2-bookworm
204
205
  environment:
205
206
  DATABASE_URL: "mysql2://root@127.0.0.1:3306/ci_test"
206
207
  - image: mariadb
@@ -213,7 +214,7 @@ executors:
213
214
  MYSQL_ROOT_HOST: '%'
214
215
  ruby_34_postgres:
215
216
  docker:
216
- - image: ruby:3.4.0-preview1-bookworm
217
+ - image: ruby:3.4.0-preview2-bookworm
217
218
  environment:
218
219
  DATABASE_URL: "postgres://postgres:test@127.0.0.1:5432/ci_test"
219
220
  - image: postgres
@@ -359,7 +360,7 @@ jobs:
359
360
  executor: ruby_33
360
361
  steps:
361
362
  - checkout
362
- - run_sonarqube
363
+ # - run_sonarqube
363
364
  publish:
364
365
  executor: ruby_33
365
366
  steps:
@@ -442,6 +443,23 @@ workflows:
442
443
  - "./gemfiles/rails_61.gemfile"
443
444
  - "./gemfiles/rails_70.gemfile"
444
445
  - "./gemfiles/rails_71.gemfile"
446
+ rails8_ruby_33_34:
447
+ jobs:
448
+ - test_apprisal:
449
+ matrix:
450
+ parameters:
451
+ stack:
452
+ - ruby_32
453
+ - ruby_32_postgres
454
+ - ruby_32_mysql2
455
+ - ruby_33
456
+ - ruby_33_postgres
457
+ - ruby_33_mysql2
458
+ - ruby_34
459
+ - ruby_34_postgres
460
+ - ruby_34_mysql2
461
+ gemfile:
462
+ - "./gemfiles/rails_80.gemfile"
445
463
  sequel:
446
464
  jobs:
447
465
  - test_apprisal:
@@ -3,17 +3,18 @@
3
3
  | Package name | Support Policy | Beta version | Last Supported Version | Latest version | Up-to-date | Cloud Native |
4
4
  |:---------------|:-----------------|:---------------|:-------------------------|:-----------------|:-------------|:---------------|
5
5
  | Cuba | On demand | No | 4.0.3 | 4.0.3 | Yes | No |
6
- | Rack | 0-day | No | 3.1.3 | 3.1.3 | Yes | No |
7
- | Rails | 30-days | No | 7.1.3.4 | 7.1.3.4 | Yes | No |
8
- | Rails::API | 30-days | No | 0.4.1 | 0.4.1 | Yes | No |
9
- | Rails LTS | On demand | No | 5.2 | 5.2 | Yes | No |
10
- | Roda | 30-days | No | 3.81.0 | 3.81.0 | Yes | No |
11
- | Sinatra | 30-days | No | 4.0.0 | 4.0.0 | Yes | No |
12
- | Excon | 30-days | No | 0.110.0 | 0.110.0 | Yes | Yes |
13
- | gRPC | 30-days | No | 1.64.0 | 1.64.0 | Yes | No |
14
- | Net::HTTP | 0-day | No | 0.4.1 | 0.4.1 | Yes | No |
15
- | Rest-Client | 30-days | No | 2.1.0 | 2.1.0 | Yes | No |
16
- | Dalli | 30-days | No | 3.2.8 | 3.2.8 | Yes | No |
17
- | Resque | 30-days | No | 2.6.0 | 2.6.0 | Yes | Yes |
18
- | Sidekiq | 30-days | No | 7.2.4 | 7.2.4 | Yes | Yes |
19
- | GraphQL | 30-days | No | 2.3.5 | 2.3.5 | Yes | Yes |
6
+ | Rack | 45-days | No | 3.1.7 | 3.1.7 | Yes | No |
7
+ | Rails | 45-days | No | 7.2.1 | 7.2.1 | Yes | No |
8
+ | Rails::API | 45-days | No | 0.4.1 | 0.4.1 | Yes | No |
9
+ | Rails LTS | On demand | No | 6.1 | 6.1 | Yes | No |
10
+ | Roda | 45-days | No | 3.84.0 | 3.84.0 | Yes | No |
11
+ | Sinatra | 45-days | No | 4.0.0 | 4.0.0 | Yes | No |
12
+ | Excon | 45-days | No | 0.112.0 | 0.112.0 | Yes | Yes |
13
+ | gRPC | 45-days | No | 1.66.0 | 1.66.0 | Yes | No |
14
+ | Net::HTTP | 0-day | Yes | 0.4.1 | 0.4.1 | Yes | No |
15
+ | Rest-Client | 45-days | No | 2.1.0 | 2.1.0 | Yes | No |
16
+ | Dalli | 45-days | No | 3.2.8 | 3.2.8 | Yes | No |
17
+ | Resque | 45-days | No | 2.6.0 | 2.6.0 | Yes | Yes |
18
+ | Sidekiq | 45-days | No | 7.3.2 | 7.3.2 | Yes | Yes |
19
+ | GraphQL | 45-days | No | 2.3.17 | 2.3.17 | Yes | Yes |
20
+ | Sequel | 45-days | No | 5.60.0 | 5.84.0 | Yes | No |
@@ -89,6 +89,12 @@
89
89
  "Support Policy": "45-days",
90
90
  "Beta version": "No",
91
91
  "Cloud Native": "Yes"
92
+ },
93
+ {
94
+ "Package name": "Sequel",
95
+ "Support Policy": "45-days",
96
+ "Beta version": "No",
97
+ "Cloud Native": "Yes"
92
98
  }
93
99
  ]
94
100
  }
@@ -27,7 +27,8 @@ def get_bundle_install_output():
27
27
  "rails": "rails_71_sqlite3_ruby_3.3.",
28
28
  "dalli": "dalli_32_ruby_3.3.",
29
29
  "resque": "resque_20_ruby_3.3.",
30
- "sidekiq": "sidekiq_70_ruby_3.3."
30
+ "sidekiq": "sidekiq_70_ruby_3.3.",
31
+ "sequel": "sequel_58_ruby_3.3."
31
32
  }
32
33
 
33
34
  bundle_install_output = ""
data/.tekton/README.md CHANGED
@@ -199,8 +199,8 @@ https://github.com/tektoncd/triggers/blob/main/docs/interceptors.md#owners-valid
199
199
  After this ensure that there is a pod and a service created:
200
200
 
201
201
  ````bash
202
- kubectl get pod | grep -i el-github-pr-eventlistener
203
- kubectl get svc | grep -i el-github-pr-eventlistener
202
+ kubectl get pod | grep -i el-github-pr-ruby-eventlistener
203
+ kubectl get svc | grep -i el-github-pr-ruby-eventlistener
204
204
  ````
205
205
 
206
206
  Do not continue if any of these missing.
@@ -80,8 +80,8 @@ spec:
80
80
  value:
81
81
  - "./gemfiles/cuba_30.gemfile"
82
82
  - "./gemfiles/cuba_40.gemfile"
83
- - "./gemfiles/excon_02.gemfile"
84
83
  - "./gemfiles/excon_079.gemfile"
84
+ - "./gemfiles/excon_0100.gemfile"
85
85
  - "./gemfiles/excon_100.gemfile"
86
86
  - "./gemfiles/graphql_10.gemfile"
87
87
  - "./gemfiles/graphql_20.gemfile"
@@ -118,8 +118,8 @@ spec:
118
118
  value:
119
119
  - "./gemfiles/cuba_30.gemfile"
120
120
  - "./gemfiles/cuba_40.gemfile"
121
- - "./gemfiles/excon_02.gemfile"
122
121
  - "./gemfiles/excon_079.gemfile"
122
+ - "./gemfiles/excon_0100.gemfile"
123
123
  - "./gemfiles/excon_100.gemfile"
124
124
  - "./gemfiles/graphql_10.gemfile"
125
125
  - "./gemfiles/graphql_20.gemfile"
@@ -156,8 +156,8 @@ spec:
156
156
  value:
157
157
  - "./gemfiles/cuba_30.gemfile"
158
158
  - "./gemfiles/cuba_40.gemfile"
159
- - "./gemfiles/excon_02.gemfile"
160
159
  - "./gemfiles/excon_079.gemfile"
160
+ - "./gemfiles/excon_0100.gemfile"
161
161
  - "./gemfiles/excon_100.gemfile"
162
162
  - "./gemfiles/graphql_10.gemfile"
163
163
  - "./gemfiles/graphql_20.gemfile"
@@ -194,8 +194,8 @@ spec:
194
194
  value:
195
195
  - "./gemfiles/cuba_30.gemfile"
196
196
  - "./gemfiles/cuba_40.gemfile"
197
- - "./gemfiles/excon_02.gemfile"
198
197
  - "./gemfiles/excon_079.gemfile"
198
+ - "./gemfiles/excon_0100.gemfile"
199
199
  - "./gemfiles/excon_100.gemfile"
200
200
  - "./gemfiles/graphql_10.gemfile"
201
201
  - "./gemfiles/graphql_20.gemfile"
@@ -232,8 +232,8 @@ spec:
232
232
  value:
233
233
  - "./gemfiles/cuba_30.gemfile"
234
234
  - "./gemfiles/cuba_40.gemfile"
235
- - "./gemfiles/excon_02.gemfile"
236
235
  - "./gemfiles/excon_079.gemfile"
236
+ - "./gemfiles/excon_0100.gemfile"
237
237
  - "./gemfiles/excon_100.gemfile"
238
238
  - "./gemfiles/graphql_10.gemfile"
239
239
  - "./gemfiles/graphql_20.gemfile"
@@ -499,9 +499,63 @@ spec:
499
499
  workspaces:
500
500
  - name: task-pvc
501
501
  workspace: ruby-tracer-ci-pipeline-pvc
502
- - name: generate-currency-report
502
+ - name: unittest-sequel-sqlite3
503
503
  runAfter:
504
504
  - unittest-rails-postgres
505
+ matrix:
506
+ params:
507
+ - name: imageDigest
508
+ value:
509
+ # 3.0.6-bullseye
510
+ - "sha256:3166618469ad8a3190d80f43b322818fafb4bfac0b4882255eee3346af2a0a35"
511
+ # 3.1.4-bookworm
512
+ - "sha256:ec69284bcbceb0a23ffc070ef2e0e8eb0fe495c20efbd51846b103338c3da1e4"
513
+ # 3.2.3-bookworm
514
+ - "sha256:007d2edd515f9cfc8c5c571486aca4fc4a25c903d004decee302961bb8c636ed"
515
+ # 3.3.1-bookworm
516
+ - "sha256:5cf0004738f54bd67e4c4316394208ca38a6726eda7a1b0586d95601aad86e5d"
517
+ # 3.4.0-preview1-bookworm
518
+ - "sha256:2690af2a931469abe513b22a083b5ae0b56d4feffc0d3496eb6378723ab203e7"
519
+ - name: gemfile
520
+ value:
521
+ - "./gemfiles/sequel_56.gemfile"
522
+ - "./gemfiles/sequel_57.gemfile"
523
+ - "./gemfiles/sequel_58.gemfile"
524
+ taskRef:
525
+ name: ruby-tracer-unittest-sequel-sqlite3-task
526
+ workspaces:
527
+ - name: task-pvc
528
+ workspace: ruby-tracer-ci-pipeline-pvc
529
+ - name: unittest-sequel-mysql2
530
+ runAfter:
531
+ - unittest-sequel-sqlite3
532
+ matrix:
533
+ params:
534
+ - name: imageDigest
535
+ value:
536
+ # 3.0.6-bullseye
537
+ - "sha256:3166618469ad8a3190d80f43b322818fafb4bfac0b4882255eee3346af2a0a35"
538
+ # 3.1.4-bookworm
539
+ - "sha256:ec69284bcbceb0a23ffc070ef2e0e8eb0fe495c20efbd51846b103338c3da1e4"
540
+ # 3.2.3-bookworm
541
+ - "sha256:007d2edd515f9cfc8c5c571486aca4fc4a25c903d004decee302961bb8c636ed"
542
+ # 3.3.1-bookworm
543
+ - "sha256:5cf0004738f54bd67e4c4316394208ca38a6726eda7a1b0586d95601aad86e5d"
544
+ # 3.4.0-preview1-bookworm
545
+ - "sha256:2690af2a931469abe513b22a083b5ae0b56d4feffc0d3496eb6378723ab203e7"
546
+ - name: gemfile
547
+ value:
548
+ - "./gemfiles/sequel_56.gemfile"
549
+ - "./gemfiles/sequel_57.gemfile"
550
+ - "./gemfiles/sequel_58.gemfile"
551
+ taskRef:
552
+ name: ruby-tracer-unittest-sequel-mysql2-task
553
+ workspaces:
554
+ - name: task-pvc
555
+ workspace: ruby-tracer-ci-pipeline-pvc
556
+ - name: generate-currency-report
557
+ runAfter:
558
+ - unittest-sequel-mysql2
505
559
  taskRef:
506
560
  name: ruby-generate-currency-report-task
507
561
  workspaces:
@@ -24,10 +24,8 @@ spec:
24
24
  params:
25
25
  - name: revision
26
26
  value: master
27
- - name: git-commit-sha
28
- value: $(tt.params.git-commit-sha)
29
27
  pipelineRef:
30
- name: github-pr-ruby-tracer-ci-pipeline
28
+ name: ruby-tracer-ci-pipeline
31
29
  workspaces:
32
30
  - name: ruby-tracer-ci-pipeline-pvc
33
31
  volumeClaimTemplate:
data/.tekton/task.yaml CHANGED
@@ -57,6 +57,10 @@ spec:
57
57
  - name: mariadb
58
58
  # mariadb:11.3.2
59
59
  image: mariadb@sha256:851f05fe1e4cb290442c1b12b7108436a33fd8f6a733d4989950322d06d45c65
60
+ startupProbe:
61
+ initialDelaySeconds: 10
62
+ tcpSocket:
63
+ port: 3306
60
64
  env:
61
65
  - name: MYSQL_ROOT_PASSWORD # or MARIADB_ROOT_PASSWORD
62
66
  value: passw0rd
@@ -93,6 +97,10 @@ spec:
93
97
  - name: postgres
94
98
  # postgres:16.2-bookworm
95
99
  image: postgres@sha256:6b841c8f6a819884207402f1209a8116844365df15fca8cf556fc54a24c70800
100
+ startupProbe:
101
+ initialDelaySeconds: 10
102
+ tcpSocket:
103
+ port: 5432
96
104
  env:
97
105
  - name: POSTGRES_DB
98
106
  value: 'ci_test'
@@ -182,6 +190,10 @@ spec:
182
190
  - name: redis
183
191
  # redis:7.2.4-bookworm
184
192
  image: redis@sha256:fe98b2d39d462d06a7360e2860dd6ceff930745e3731eccb3c1406dd0dd7f744
193
+ startupProbe:
194
+ initialDelaySeconds: 10
195
+ tcpSocket:
196
+ port: 6379
185
197
  params:
186
198
  - name: imageDigest
187
199
  type: string
@@ -245,6 +257,10 @@ spec:
245
257
  - name: mongo
246
258
  # mongo:5.0.25-focal
247
259
  image: mongo@sha256:d1b8a7b77424347397653ab8ff500c66b1e9979b4cebf826951d37b0d3966721
260
+ startupProbe:
261
+ initialDelaySeconds: 10
262
+ tcpSocket:
263
+ port: 27017
248
264
  params:
249
265
  - name: imageDigest
250
266
  type: string
@@ -294,6 +310,74 @@ spec:
294
310
  ---
295
311
  apiVersion: tekton.dev/v1
296
312
  kind: Task
313
+ metadata:
314
+ name: ruby-tracer-unittest-sequel-sqlite3-task
315
+ spec:
316
+ params:
317
+ - name: imageDigest
318
+ type: string
319
+ - name: gemfile
320
+ type: string
321
+ workspaces:
322
+ - name: task-pvc
323
+ mountPath: /workspace
324
+ steps:
325
+ - name: unittest
326
+ image: ruby@$(params.imageDigest)
327
+ env:
328
+ - name: TEST_CONFIGURATION
329
+ value: libraries
330
+ - name: BUNDLE_GEMFILE
331
+ value: $(params.gemfile)
332
+ - name: DATABASE_URL
333
+ value: "sqlite3::memory:"
334
+ workingDir: /workspace/ruby-sensor/
335
+ command:
336
+ - /workspace/ruby-sensor/.tekton/run_unittests.sh
337
+ ---
338
+ apiVersion: tekton.dev/v1
339
+ kind: Task
340
+ metadata:
341
+ name: ruby-tracer-unittest-sequel-mysql2-task
342
+ spec:
343
+ sidecars:
344
+ # MySQL (compatible Mariadb)
345
+ - name: mariadb
346
+ # mariadb:11.3.2
347
+ image: mariadb@sha256:851f05fe1e4cb290442c1b12b7108436a33fd8f6a733d4989950322d06d45c65
348
+ startupProbe:
349
+ initialDelaySeconds: 10
350
+ tcpSocket:
351
+ port: 3306
352
+ env:
353
+ - name: MYSQL_ROOT_PASSWORD # or MARIADB_ROOT_PASSWORD
354
+ value: passw0rd
355
+ - name: MYSQL_DATABASE # or MARIADB_DATABASE
356
+ value: ci_test
357
+ params:
358
+ - name: imageDigest
359
+ type: string
360
+ - name: gemfile
361
+ type: string
362
+ workspaces:
363
+ - name: task-pvc
364
+ mountPath: /workspace
365
+ steps:
366
+ - name: unittest
367
+ image: ruby@$(params.imageDigest)
368
+ env:
369
+ - name: TEST_CONFIGURATION
370
+ value: libraries
371
+ - name: BUNDLE_GEMFILE
372
+ value: $(params.gemfile)
373
+ - name: DATABASE_URL
374
+ value: "mysql2://root:passw0rd@127.0.0.1:3306/ci_test"
375
+ workingDir: /workspace/ruby-sensor/
376
+ command:
377
+ - /workspace/ruby-sensor/.tekton/run_unittests.sh
378
+ ---
379
+ apiVersion: tekton.dev/v1
380
+ kind: Task
297
381
  metadata:
298
382
  name: ruby-generate-currency-report-task
299
383
  spec:
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ require 'json'
9
9
  Rake::TestTask.new(:test) do |t|
10
10
  t.verbose = false
11
11
  t.warning = false
12
- t.ruby_opts = []
12
+ t.ruby_opts = ["--parser=parse.y"] if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('3.3')
13
13
 
14
14
  t.libs << "test"
15
15
  t.libs << "lib"
@@ -1,7 +1,4 @@
1
- # This file was generated by Appraisal
2
-
3
- # (c) Copyright IBM Corp. 2021
4
- # (c) Copyright Instana Inc. 2021
1
+ # (c) Copyright IBM Corp. 2023
5
2
 
6
3
  source "https://rubygems.org"
7
4
 
@@ -12,6 +9,6 @@ gem "webmock"
12
9
  gem "puma"
13
10
  gem "rack-test"
14
11
  gem "simplecov", "~> 0.21.2"
15
- gem "excon", ">= 0.21.0", "< 1.0"
12
+ gem "excon", ">= 0.100.0", "< 1.0"
16
13
 
17
14
  gemspec path: "../"
@@ -12,6 +12,6 @@ gem "webmock"
12
12
  gem "puma"
13
13
  gem "rack-test"
14
14
  gem "simplecov", "~> 0.21.2"
15
- gem "excon", ">= 0.21.0", "< 1.0"
15
+ gem "excon", "0.21.0"
16
16
 
17
17
  gemspec path: "../"
@@ -12,6 +12,6 @@ gem "webmock"
12
12
  gem "puma"
13
13
  gem "rack-test"
14
14
  gem "simplecov", "~> 0.21.2"
15
- gem "excon", ">= 0.79.0", "< 1.0"
15
+ gem "excon", "0.79.0"
16
16
 
17
17
  gemspec path: "../"
@@ -1,4 +1,4 @@
1
- # (c) Copyright IBM Corp. 2023
1
+ # (c) Copyright IBM Corp. 2024
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -9,6 +9,6 @@ gem "webmock"
9
9
  gem "puma"
10
10
  gem "rack-test"
11
11
  gem "simplecov", "~> 0.21.2"
12
- gem "excon", ">= 0.100.0", "< 1.0"
12
+ gem "excon", ">= 1.0.0", "< 2.0"
13
13
 
14
14
  gemspec path: "../"
@@ -9,7 +9,7 @@ gem "rack-test"
9
9
  gem "simplecov", "~> 0.21.2"
10
10
  gem "mail", ">= 2.8.1"
11
11
  gem "mutex_m" # mutex_m is not part of the default gems since Ruby 3.4.0
12
- gem "rails", ">= 7.1"
12
+ gem "rails", "~> 7.1"
13
13
  gem "mysql2", "0.5.5"
14
14
  gem "pg"
15
15
  gem "sqlite3", "~> 1.4"
@@ -0,0 +1,17 @@
1
+ # (c) Copyright IBM Corp. 2024
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "minitest-reporters"
6
+ gem "webmock"
7
+ gem "puma"
8
+ gem "rack-test"
9
+ gem "simplecov", "~> 0.21.2"
10
+ gem "mail", ">= 2.8.1"
11
+ gem "mutex_m" # mutex_m is not part of the default gems since Ruby 3.4.0
12
+ gem "rails", ">= 8.0"
13
+ gem "mysql2", "0.5.5"
14
+ gem "pg"
15
+ gem "sqlite3", ">= 2.1"
16
+
17
+ gemspec path: "../"
@@ -9,7 +9,7 @@ gem "webmock"
9
9
  gem "puma"
10
10
  gem "rack-test"
11
11
  gem "simplecov", "~> 0.21.2"
12
- gem "sequel", "~> 5.60"
12
+ gem "sequel", "~> 5.60.0"
13
13
  gem "sqlite3", "~> 1.4"
14
14
  gem "mysql2", "0.5.5"
15
15
 
@@ -9,7 +9,7 @@ gem "webmock"
9
9
  gem "puma"
10
10
  gem "rack-test"
11
11
  gem "simplecov", "~> 0.21.2"
12
- gem "sequel", "~> 5.70"
12
+ gem "sequel", "~> 5.70.0"
13
13
  gem "sqlite3", "~> 1.4"
14
14
  gem "mysql2", "0.5.5"
15
15
 
@@ -12,6 +12,8 @@ module Instana
12
12
  @logger = logger
13
13
  @future = nil
14
14
  @client = nil
15
+ # Timer task to poll for agent liveliness
16
+ @agent_connection_task = Concurrent::TimerTask.new(execution_interval: 75) { announce }
15
17
  end
16
18
 
17
19
  def setup; end
@@ -27,7 +29,12 @@ module Instana
27
29
  alias start spawn_background_thread
28
30
 
29
31
  def announce
30
- @client = until_not_nil { HostAgentLookup.new.call }
32
+ @client = with_timeout { HostAgentLookup.new.call }
33
+ # Shuts down the connection task based on agent connection client.
34
+ @client ? @agent_connection_task.shutdown : @agent_connection_task.execute
35
+ # Do not continue further if the agent is down/connection to the agent is unsuccessfull
36
+ return nil unless @client
37
+
31
38
  begin
32
39
  @discovery.send(:observers)&.send(:notify_and_delete_observers, Time.now, nil, nil)
33
40
  ensure
@@ -74,14 +81,16 @@ module Instana
74
81
 
75
82
  private
76
83
 
77
- def until_not_nil
78
- loop do
84
+ def with_timeout
85
+ 15.times do
79
86
  result = yield
80
87
  return result unless result.nil?
81
88
 
82
89
  @logger.debug("Waiting on a connection to the agent.")
83
90
  sleep(1)
84
91
  end
92
+ @logger.info("Agent connection timed out retrying after 60 seconds")
93
+ nil
85
94
  end
86
95
 
87
96
  def discovery_value
@@ -17,10 +17,9 @@ module Instana
17
17
 
18
18
  ::Instana::Tracer.trace(:activejob, tags) do
19
19
  context = ::Instana.tracer.context
20
- job.arguments = [{
21
- given_arguments: job.arguments,
22
- instana_context: context ? context.to_hash : nil
23
- }]
20
+ job.arguments.append({
21
+ instana_context: context ? context.to_hash : nil
22
+ })
24
23
 
25
24
  block.call
26
25
  end
@@ -35,10 +34,9 @@ module Instana
35
34
  job_id: job.job_id
36
35
  }
37
36
  }
38
-
39
- incoming_context = if job.arguments.is_a?(Array) && job.arguments.first.is_a?(Hash)
40
- instana_context = job.arguments.first[:instana_context]
41
- job.arguments = job.arguments.first[:given_arguments]
37
+ incoming_context = if job.arguments.is_a?(Array) && job.arguments.last.is_a?(Hash) && job.arguments.last.key?(:instana_context)
38
+ instana_context = job.arguments.last[:instana_context]
39
+ job.arguments.pop
42
40
  instana_context ? ::Instana::SpanContext.new(instana_context[:trace_id], instana_context[:span_id]) : nil
43
41
  end
44
42
 
@@ -6,7 +6,7 @@ module Instana
6
6
  module ActiveRecord
7
7
  IGNORED_NAMES = %w[SCHEMA EXPLAIN CACHE].freeze
8
8
  IGNORED_SQL = %w[BEGIN COMMIT SET].freeze
9
- SANITIZE_REGEXP = /('[\s\S][^']*'|\d*\.\d+|\d+|NULL)/i.freeze
9
+ SANITIZE_REGEXP = /('[\s\S][^']*'|\d*\.\d+|\d+|NULL)/i
10
10
 
11
11
  def log(sql, name = 'SQL', binds = [], *args, **kwargs, &block)
12
12
  call_payload = {
@@ -9,8 +9,8 @@ require 'rack/request'
9
9
 
10
10
  module Instana
11
11
  class InstrumentedRequest < Rack::Request
12
- W3C_TRACE_PARENT_FORMAT = /[0-9a-f][0-9a-e]-(?<trace>[0-9a-f]{32})-(?<parent>[0-9a-f]{16})-(?<flags>[0-9a-f]{2})/.freeze
13
- INSTANA_TRACE_STATE = /in=(?<trace>[0-9a-f]+);(?<span>[0-9a-f]+)/.freeze
12
+ W3C_TRACE_PARENT_FORMAT = /[0-9a-f][0-9a-e]-(?<trace>[0-9a-f]{32})-(?<parent>[0-9a-f]{16})-(?<flags>[0-9a-f]{2})/
13
+ INSTANA_TRACE_STATE = /in=(?<trace>[0-9a-f]+);(?<span>[0-9a-f]+)/
14
14
 
15
15
  def skip_trace?
16
16
  # Honor X-Instana-L
@@ -5,7 +5,7 @@ module Instana
5
5
  module Sequel
6
6
  IGNORED_SQL = %w[BEGIN COMMIT SET].freeze
7
7
  VERSION_SELECT_STATEMENT = "SELECT VERSION()".freeze
8
- SANITIZE_REGEXP = /('[\s\S][^']*'|\d*\.\d+|\d+|NULL)/i.freeze
8
+ SANITIZE_REGEXP = /('[\s\S][^']*'|\d*\.\d+|\d+|NULL)/i
9
9
 
10
10
  def log_connection_yield(sql, conn, *args)
11
11
  call_payload = {
@@ -2,6 +2,6 @@
2
2
  # (c) Copyright Instana Inc. 2016
3
3
 
4
4
  module Instana
5
- VERSION = "1.216.0"
5
+ VERSION = "1.217.1"
6
6
  VERSION_FULL = "instana-#{VERSION}"
7
7
  end
data/lib/instana.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # (c) Copyright IBM Corp. 2021
2
2
  # (c) Copyright Instana Inc. 2016
3
-
4
- require 'instana/setup'
3
+ if ENV.fetch('INSTANA_DISABLE', false) && defined?(::Instana)
4
+ Object.send(:remove_const, :Instana)
5
+ end
5
6
 
6
7
  # Boot the instana agent background thread. If you wish to have greater
7
8
  # control on the where and which thread this is run in, instead use
@@ -14,6 +15,7 @@ require 'instana/setup'
14
15
 
15
16
  # :nocov:
16
17
  unless ENV.fetch('INSTANA_DISABLE', false)
18
+ require 'instana/setup'
17
19
  ::Instana::Activator.start
18
20
  ::Instana.agent.spawn_background_thread
19
21
 
@@ -7,6 +7,7 @@ require 'rack/test'
7
7
  class SinatraTest < Minitest::Test
8
8
  include Rack::Test::Methods
9
9
  APP = Rack::Builder.parse_file('test/support/apps/sinatra/config.ru')
10
+
10
11
  sinatra_version = Gem::Specification.find_by_name('sinatra').version
11
12
  if sinatra_version < Gem::Version.new('4.0.0')
12
13
  APP = APP.first
@@ -18,8 +19,8 @@ class SinatraTest < Minitest::Test
18
19
 
19
20
  def test_basic_get
20
21
  clear_all!
21
-
22
22
  r = get '/'
23
+
23
24
  assert last_response.ok?
24
25
 
25
26
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.216.0
4
+ version: 1.217.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Giacomo Lombardo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-11 00:00:00.000000000 Z
11
+ date: 2024-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -210,7 +210,7 @@ files:
210
210
  - gemfiles/dalli_20.gemfile
211
211
  - gemfiles/dalli_30.gemfile
212
212
  - gemfiles/dalli_32.gemfile
213
- - gemfiles/excon_02.gemfile
213
+ - gemfiles/excon_0100.gemfile
214
214
  - gemfiles/excon_021.gemfile
215
215
  - gemfiles/excon_079.gemfile
216
216
  - gemfiles/excon_100.gemfile
@@ -230,6 +230,7 @@ files:
230
230
  - gemfiles/rails_61.gemfile
231
231
  - gemfiles/rails_70.gemfile
232
232
  - gemfiles/rails_71.gemfile
233
+ - gemfiles/rails_80.gemfile
233
234
  - gemfiles/redis_40.gemfile
234
235
  - gemfiles/redis_50.gemfile
235
236
  - gemfiles/redis_51.gemfile
@@ -458,7 +459,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
458
459
  - !ruby/object:Gem::Version
459
460
  version: '0'
460
461
  requirements: []
461
- rubygems_version: 3.5.18
462
+ rubygems_version: 3.5.23
462
463
  signing_key:
463
464
  specification_version: 4
464
465
  summary: Ruby Distributed Tracing & Metrics Sensor for Instana