appsignal 3.4.13 → 3.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.semaphore/semaphore.yml +180 -14
  3. data/CHANGELOG.md +164 -0
  4. data/README.md +2 -0
  5. data/Rakefile +3 -1
  6. data/build_matrix.yml +7 -13
  7. data/ext/Rakefile +8 -1
  8. data/ext/agent.rb +27 -27
  9. data/ext/appsignal_extension.c +0 -24
  10. data/ext/base.rb +4 -1
  11. data/gemfiles/redis-4.gemfile +5 -0
  12. data/gemfiles/redis-5.gemfile +6 -0
  13. data/lib/appsignal/cli/diagnose/paths.rb +33 -10
  14. data/lib/appsignal/cli/diagnose.rb +6 -1
  15. data/lib/appsignal/config.rb +19 -5
  16. data/lib/appsignal/demo.rb +1 -1
  17. data/lib/appsignal/environment.rb +24 -13
  18. data/lib/appsignal/event_formatter.rb +1 -1
  19. data/lib/appsignal/extension/jruby.rb +4 -17
  20. data/lib/appsignal/extension.rb +1 -1
  21. data/lib/appsignal/helpers/instrumentation.rb +10 -10
  22. data/lib/appsignal/helpers/metrics.rb +15 -13
  23. data/lib/appsignal/hooks/active_job.rb +9 -1
  24. data/lib/appsignal/hooks/redis.rb +1 -0
  25. data/lib/appsignal/hooks/redis_client.rb +27 -0
  26. data/lib/appsignal/hooks.rb +3 -2
  27. data/lib/appsignal/integrations/hanami.rb +1 -1
  28. data/lib/appsignal/integrations/padrino.rb +1 -1
  29. data/lib/appsignal/integrations/railtie.rb +1 -1
  30. data/lib/appsignal/integrations/redis_client.rb +20 -0
  31. data/lib/appsignal/integrations/sidekiq.rb +2 -2
  32. data/lib/appsignal/integrations/sinatra.rb +1 -1
  33. data/lib/appsignal/logger.rb +2 -0
  34. data/lib/appsignal/minutely.rb +4 -4
  35. data/lib/appsignal/probes/gvl.rb +1 -1
  36. data/lib/appsignal/probes/helpers.rb +1 -1
  37. data/lib/appsignal/probes/mri.rb +1 -1
  38. data/lib/appsignal/probes/sidekiq.rb +10 -8
  39. data/lib/appsignal/rack/body_wrapper.rb +161 -0
  40. data/lib/appsignal/rack/generic_instrumentation.rb +18 -5
  41. data/lib/appsignal/rack/rails_instrumentation.rb +17 -5
  42. data/lib/appsignal/rack/sinatra_instrumentation.rb +17 -5
  43. data/lib/appsignal/rack/streaming_listener.rb +27 -36
  44. data/lib/appsignal/span.rb +2 -2
  45. data/lib/appsignal/transaction.rb +46 -10
  46. data/lib/appsignal/utils/deprecation_message.rb +2 -2
  47. data/lib/appsignal/version.rb +1 -1
  48. data/lib/appsignal.rb +38 -31
  49. data/resources/cacert.pem +321 -159
  50. data/spec/lib/appsignal/cli/diagnose/utils_spec.rb +11 -0
  51. data/spec/lib/appsignal/cli/diagnose_spec.rb +38 -12
  52. data/spec/lib/appsignal/config_spec.rb +3 -2
  53. data/spec/lib/appsignal/hooks/activejob_spec.rb +26 -1
  54. data/spec/lib/appsignal/hooks/redis_client_spec.rb +222 -0
  55. data/spec/lib/appsignal/hooks/redis_spec.rb +98 -76
  56. data/spec/lib/appsignal/hooks_spec.rb +4 -4
  57. data/spec/lib/appsignal/integrations/railtie_spec.rb +2 -2
  58. data/spec/lib/appsignal/integrations/sidekiq_spec.rb +3 -3
  59. data/spec/lib/appsignal/integrations/sinatra_spec.rb +2 -2
  60. data/spec/lib/appsignal/minutely_spec.rb +2 -2
  61. data/spec/lib/appsignal/probes/sidekiq_spec.rb +29 -6
  62. data/spec/lib/appsignal/rack/body_wrapper_spec.rb +220 -0
  63. data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +3 -2
  64. data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +5 -3
  65. data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +3 -1
  66. data/spec/lib/appsignal/rack/streaming_listener_spec.rb +9 -53
  67. data/spec/lib/appsignal/transaction_spec.rb +95 -2
  68. data/spec/lib/appsignal_spec.rb +62 -60
  69. data/spec/spec_helper.rb +1 -1
  70. data/spec/support/fixtures/projects/valid/config/appsignal.yml +3 -3
  71. data/spec/support/helpers/config_helpers.rb +6 -2
  72. data/spec/support/helpers/dependency_helper.rb +9 -1
  73. data/spec/support/helpers/log_helpers.rb +2 -2
  74. metadata +9 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da9d753b6bb738432dde776aac3404c660df7362d6fff5612ceb4535ab8dd00f
4
- data.tar.gz: 712225f476fd4e66c83bc2b59f605eca653228fa75551f34c8210206bb87aea9
3
+ metadata.gz: 8990517cea95c50e6516636e35d845bfeab2d2fa936d356be9b3f2b976b9fc7a
4
+ data.tar.gz: 7729d6172b3f0df044241548f347e2d22bdd0b295454a9bae93cfbc6f72119db
5
5
  SHA512:
6
- metadata.gz: 7fcd4d3b278f44dc3033393708923819dce551f5bacb1e890c674cb332351bf1d756c882d05315b47582750d7370de5e2c729088b565cf0b3807ce977bd03631
7
- data.tar.gz: 8980095a2da7d7f044e68fa02600a73ad48c584e1a450e2dca4be2e7fc4cc2579a7bb5a627d9ee691e0bac1f7065f9d100f705437df99c0875bcb34182da8eaf
6
+ metadata.gz: b866452cb869cf8da793720d18f65927cb867eeb150b299d25c23ea6d417638735c3fc871bcf4218cabb047b93913e0051d9880b957a3c17f1ff4de93debdc09
7
+ data.tar.gz: 252ed529380e877ba34d3a5b7d921f042835e5d9baab95010fda67d195aa0ee647895f8d0c12a18a086bfc7594179155c83c3635eb3afd66ef265a3fa484a36b
@@ -8,7 +8,7 @@ name: AppSignal Ruby Build and Tests
8
8
  agent:
9
9
  machine:
10
10
  type: e1-standard-2
11
- os_image: ubuntu1804
11
+ os_image: ubuntu2004
12
12
  auto_cancel:
13
13
  running:
14
14
  when: branch != 'main' AND branch != 'develop'
@@ -17,19 +17,13 @@ global_job_config:
17
17
  - name: RUNNING_IN_CI
18
18
  value: 'true'
19
19
  - name: _BUNDLER_CACHE
20
- value: v2
20
+ value: v3
21
21
  - name: _GEMS_CACHE
22
- value: v2
22
+ value: v3
23
23
  prologue:
24
24
  commands:
25
25
  - checkout
26
26
  - rm -f $HOME/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d/exec/~gem-rehash.bash
27
- - |
28
- if [ -n "$_C_VERSION" ]; then
29
- sem-version c $_C_VERSION
30
- else
31
- echo Skipping C-lang install
32
- fi
33
27
  - |
34
28
  if [ -n "$RUBY_VERSION" ]; then
35
29
  if ! (sem-version ruby "$RUBY_VERSION"); then
@@ -120,6 +114,9 @@ blocks:
120
114
  - cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-diagnose-$(checksum Gemfile)
121
115
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
122
116
  - "./support/bundler_wrapper exec rake extension:install"
117
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
118
+ file found'"
119
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
123
120
  - git submodule init
124
121
  - git submodule update
125
122
  jobs:
@@ -152,6 +149,9 @@ blocks:
152
149
  - bundle config set clean 'true'
153
150
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
154
151
  - "./support/bundler_wrapper exec rake extension:install"
152
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
153
+ file found'"
154
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
155
155
  epilogue: &1
156
156
  on_pass:
157
157
  commands:
@@ -159,11 +159,6 @@ blocks:
159
159
  appsignal.gemspec) .bundle
160
160
  - cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE)-$(checksum
161
161
  appsignal.gemspec) $HOME/.gem
162
- on_fail:
163
- commands:
164
- - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
165
- file found'"
166
- - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
167
162
  jobs:
168
163
  - name: Ruby 2.7.8 for no_dependencies
169
164
  env_vars:
@@ -206,6 +201,9 @@ blocks:
206
201
  - bundle config set clean 'true'
207
202
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
208
203
  - "./support/bundler_wrapper exec rake extension:install"
204
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
205
+ file found'"
206
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
209
207
  epilogue: *1
210
208
  jobs:
211
209
  - name: Ruby 2.7.8 for capistrano2
@@ -496,6 +494,42 @@ blocks:
496
494
  value: latest
497
495
  commands:
498
496
  - "./support/bundler_wrapper exec rake test"
497
+ - name: Ruby 2.7.8 for redis-4
498
+ env_vars:
499
+ - *2
500
+ - *3
501
+ - *4
502
+ - *5
503
+ - name: RUBY_VERSION
504
+ value: 2.7.8
505
+ - name: GEMSET
506
+ value: redis-4
507
+ - name: BUNDLE_GEMFILE
508
+ value: gemfiles/redis-4.gemfile
509
+ - name: _RUBYGEMS_VERSION
510
+ value: latest
511
+ - name: _BUNDLER_VERSION
512
+ value: latest
513
+ commands:
514
+ - "./support/bundler_wrapper exec rake test"
515
+ - name: Ruby 2.7.8 for redis-5
516
+ env_vars:
517
+ - *2
518
+ - *3
519
+ - *4
520
+ - *5
521
+ - name: RUBY_VERSION
522
+ value: 2.7.8
523
+ - name: GEMSET
524
+ value: redis-5
525
+ - name: BUNDLE_GEMFILE
526
+ value: gemfiles/redis-5.gemfile
527
+ - name: _RUBYGEMS_VERSION
528
+ value: latest
529
+ - name: _BUNDLER_VERSION
530
+ value: latest
531
+ commands:
532
+ - "./support/bundler_wrapper exec rake test"
499
533
  - name: Ruby 3.0.5
500
534
  dependencies:
501
535
  - Validation
@@ -510,6 +544,9 @@ blocks:
510
544
  - bundle config set clean 'true'
511
545
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
512
546
  - "./support/bundler_wrapper exec rake extension:install"
547
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
548
+ file found'"
549
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
513
550
  epilogue: *1
514
551
  jobs:
515
552
  - name: Ruby 3.0.5 for no_dependencies
@@ -545,6 +582,9 @@ blocks:
545
582
  - bundle config set clean 'true'
546
583
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
547
584
  - "./support/bundler_wrapper exec rake extension:install"
585
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
586
+ file found'"
587
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
548
588
  epilogue: *1
549
589
  jobs:
550
590
  - name: Ruby 3.0.5 for capistrano2
@@ -889,6 +929,42 @@ blocks:
889
929
  value: latest
890
930
  commands:
891
931
  - "./support/bundler_wrapper exec rake test"
932
+ - name: Ruby 3.0.5 for redis-4
933
+ env_vars:
934
+ - *2
935
+ - *3
936
+ - *4
937
+ - *5
938
+ - name: RUBY_VERSION
939
+ value: 3.0.5
940
+ - name: GEMSET
941
+ value: redis-4
942
+ - name: BUNDLE_GEMFILE
943
+ value: gemfiles/redis-4.gemfile
944
+ - name: _RUBYGEMS_VERSION
945
+ value: latest
946
+ - name: _BUNDLER_VERSION
947
+ value: latest
948
+ commands:
949
+ - "./support/bundler_wrapper exec rake test"
950
+ - name: Ruby 3.0.5 for redis-5
951
+ env_vars:
952
+ - *2
953
+ - *3
954
+ - *4
955
+ - *5
956
+ - name: RUBY_VERSION
957
+ value: 3.0.5
958
+ - name: GEMSET
959
+ value: redis-5
960
+ - name: BUNDLE_GEMFILE
961
+ value: gemfiles/redis-5.gemfile
962
+ - name: _RUBYGEMS_VERSION
963
+ value: latest
964
+ - name: _BUNDLER_VERSION
965
+ value: latest
966
+ commands:
967
+ - "./support/bundler_wrapper exec rake test"
892
968
  - name: Ruby 3.1.3
893
969
  dependencies:
894
970
  - Validation
@@ -903,6 +979,9 @@ blocks:
903
979
  - bundle config set clean 'true'
904
980
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
905
981
  - "./support/bundler_wrapper exec rake extension:install"
982
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
983
+ file found'"
984
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
906
985
  epilogue: *1
907
986
  jobs:
908
987
  - name: Ruby 3.1.3 for no_dependencies
@@ -938,6 +1017,9 @@ blocks:
938
1017
  - bundle config set clean 'true'
939
1018
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
940
1019
  - "./support/bundler_wrapper exec rake extension:install"
1020
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
1021
+ file found'"
1022
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
941
1023
  epilogue: *1
942
1024
  jobs:
943
1025
  - name: Ruby 3.1.3 for capistrano2
@@ -1264,6 +1346,42 @@ blocks:
1264
1346
  value: latest
1265
1347
  commands:
1266
1348
  - "./support/bundler_wrapper exec rake test"
1349
+ - name: Ruby 3.1.3 for redis-4
1350
+ env_vars:
1351
+ - *2
1352
+ - *3
1353
+ - *4
1354
+ - *5
1355
+ - name: RUBY_VERSION
1356
+ value: 3.1.3
1357
+ - name: GEMSET
1358
+ value: redis-4
1359
+ - name: BUNDLE_GEMFILE
1360
+ value: gemfiles/redis-4.gemfile
1361
+ - name: _RUBYGEMS_VERSION
1362
+ value: latest
1363
+ - name: _BUNDLER_VERSION
1364
+ value: latest
1365
+ commands:
1366
+ - "./support/bundler_wrapper exec rake test"
1367
+ - name: Ruby 3.1.3 for redis-5
1368
+ env_vars:
1369
+ - *2
1370
+ - *3
1371
+ - *4
1372
+ - *5
1373
+ - name: RUBY_VERSION
1374
+ value: 3.1.3
1375
+ - name: GEMSET
1376
+ value: redis-5
1377
+ - name: BUNDLE_GEMFILE
1378
+ value: gemfiles/redis-5.gemfile
1379
+ - name: _RUBYGEMS_VERSION
1380
+ value: latest
1381
+ - name: _BUNDLER_VERSION
1382
+ value: latest
1383
+ commands:
1384
+ - "./support/bundler_wrapper exec rake test"
1267
1385
  - name: Ruby 3.2.1
1268
1386
  dependencies:
1269
1387
  - Validation
@@ -1278,6 +1396,9 @@ blocks:
1278
1396
  - bundle config set clean 'true'
1279
1397
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
1280
1398
  - "./support/bundler_wrapper exec rake extension:install"
1399
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
1400
+ file found'"
1401
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
1281
1402
  epilogue: *1
1282
1403
  jobs:
1283
1404
  - name: Ruby 3.2.1 for no_dependencies
@@ -1313,6 +1434,9 @@ blocks:
1313
1434
  - bundle config set clean 'true'
1314
1435
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
1315
1436
  - "./support/bundler_wrapper exec rake extension:install"
1437
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
1438
+ file found'"
1439
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
1316
1440
  epilogue: *1
1317
1441
  jobs:
1318
1442
  - name: Ruby 3.2.1 for capistrano2
@@ -1639,6 +1763,42 @@ blocks:
1639
1763
  value: latest
1640
1764
  commands:
1641
1765
  - "./support/bundler_wrapper exec rake test"
1766
+ - name: Ruby 3.2.1 for redis-4
1767
+ env_vars:
1768
+ - *2
1769
+ - *3
1770
+ - *4
1771
+ - *5
1772
+ - name: RUBY_VERSION
1773
+ value: 3.2.1
1774
+ - name: GEMSET
1775
+ value: redis-4
1776
+ - name: BUNDLE_GEMFILE
1777
+ value: gemfiles/redis-4.gemfile
1778
+ - name: _RUBYGEMS_VERSION
1779
+ value: latest
1780
+ - name: _BUNDLER_VERSION
1781
+ value: latest
1782
+ commands:
1783
+ - "./support/bundler_wrapper exec rake test"
1784
+ - name: Ruby 3.2.1 for redis-5
1785
+ env_vars:
1786
+ - *2
1787
+ - *3
1788
+ - *4
1789
+ - *5
1790
+ - name: RUBY_VERSION
1791
+ value: 3.2.1
1792
+ - name: GEMSET
1793
+ value: redis-5
1794
+ - name: BUNDLE_GEMFILE
1795
+ value: gemfiles/redis-5.gemfile
1796
+ - name: _RUBYGEMS_VERSION
1797
+ value: latest
1798
+ - name: _BUNDLER_VERSION
1799
+ value: latest
1800
+ commands:
1801
+ - "./support/bundler_wrapper exec rake test"
1642
1802
  - name: Ruby jruby-9.4.1.0
1643
1803
  dependencies:
1644
1804
  - Validation
@@ -1653,6 +1813,9 @@ blocks:
1653
1813
  - bundle config set clean 'true'
1654
1814
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
1655
1815
  - "./support/bundler_wrapper exec rake extension:install"
1816
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
1817
+ file found'"
1818
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
1656
1819
  epilogue: *1
1657
1820
  jobs:
1658
1821
  - name: Ruby jruby-9.4.1.0 for no_dependencies
@@ -1688,6 +1851,9 @@ blocks:
1688
1851
  - bundle config set clean 'true'
1689
1852
  - "./support/bundler_wrapper install --jobs=3 --retry=3"
1690
1853
  - "./support/bundler_wrapper exec rake extension:install"
1854
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
1855
+ file found'"
1856
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
1691
1857
  epilogue: *1
1692
1858
  jobs:
1693
1859
  - name: Ruby jruby-9.4.1.0 for rails-6.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,169 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.6.1
4
+
5
+ _Published on 2024-03-05._
6
+
7
+ ### Added
8
+
9
+ - [8974d201](https://github.com/appsignal/appsignal-ruby/commit/8974d20144407fce7a274ebaeb771ef76705d901) patch - Add `activejob_report_errors` config option. When set to `"none"`, ActiveJob jobs will no longer report errors. This can be used in combination with [custom exception reporting](https://docs.appsignal.com/ruby/instrumentation/exception-handling.html). By default, the config option has the value `"all"`, which reports all errors.
10
+
11
+ ## 3.6.0
12
+
13
+ _Published on 2024-02-26._
14
+
15
+ ### Added
16
+
17
+ - [9984156f](https://github.com/appsignal/appsignal-ruby/commit/9984156faea0a76cb0fe81594e1ddf40d55dabbe) minor - Add instrumentation for all Rack responses, including streaming responses. New `response_body_each.rack`, `response_body_call.rack` and `response_body_to_ary.rack` events will be shown in the event timeline. This will show how long it takes to complete responses, depending on the response implementation.
18
+
19
+ This Sinatra route with a streaming response will be better instrumented, for example:
20
+
21
+ ```ruby
22
+ get "/stream" do
23
+ stream do |out|
24
+ sleep 1
25
+ out << "1"
26
+ sleep 1
27
+ out << "2"
28
+ sleep 1
29
+ out << "3"
30
+ end
31
+ end
32
+ ```
33
+ - [e7706038](https://github.com/appsignal/appsignal-ruby/commit/e7706038d8b2f52ea90441cfa62d5ee867d893a2) patch - Add histogram support to the OpenTelemetry HTTP server. This allows OpenTelemetry-based instrumentations to report histogram data to AppSignal as distribution metrics.
34
+
35
+ ### Changed
36
+
37
+ - [11220302](https://github.com/appsignal/appsignal-ruby/commit/112203023a58e53e607a9fd7d545044fa7d896d5) minor - **Breaking change**: Normalize CPU metrics for cgroups v1 systems. When we can detect how many CPUs are configured in the container's limits, we will normalize the CPU percentages to a maximum of 100%. This is a breaking change. Triggers for CPU percentages that are configured for a CPU percentage higher than 100% will no longer trigger after this update. Please configure triggers to a percentage with a maximum of 100% CPU percentage.
38
+ - [11220302](https://github.com/appsignal/appsignal-ruby/commit/112203023a58e53e607a9fd7d545044fa7d896d5) patch - Support fractional CPUs for cgroups v2 metrics. Previously a CPU count of 0.5 would be interpreted as 1 CPU. Now it will be correctly seen as half a CPU and calculate CPU percentages accordingly.
39
+ - [14aefc35](https://github.com/appsignal/appsignal-ruby/commit/14aefc3594b3f55a4c2ab14ba1259a4f10499467) patch - Update bundled trusted root certificates.
40
+
41
+ ### Fixed
42
+
43
+ - [f2abbd6a](https://github.com/appsignal/appsignal-ruby/commit/f2abbd6aeb2230d79139cbdf82af98557bbe5b54) patch - Fix (sub)traces not being reported in their entirety when the OpenTelemetry exporter sends one trace in multiple export requests. This would be an issue for long running traces, that are exported in several requests.
44
+
45
+ ## 3.5.6
46
+
47
+ ### Changed
48
+
49
+ - [c76a3293](https://github.com/appsignal/appsignal-ruby/commit/c76a329389c7ce55f1a8307d67fca6c0824c7b6f) patch - Default headers don't contain `REQUEST_URI` anymore as query params are not filtered. Now `REQUEST_PATH` is sent instead to avoid any PII filtering.
50
+
51
+ ## 3.5.5
52
+
53
+ _Published on 2024-02-01._
54
+
55
+ ### Added
56
+
57
+ - [d44f7092](https://github.com/appsignal/appsignal-ruby/commit/d44f7092a6a915ebe2825db7b0fe4e8e6eccd873) patch - Add support for the `redis-client` gem, which is used by the redis gem since version 5.
58
+
59
+ ### Changed
60
+
61
+ - [6b9b814d](https://github.com/appsignal/appsignal-ruby/commit/6b9b814d958ca0a13f6da312746c11481bb46cfb) patch - Make the debug log message for OpenTelemetry spans from libraries we don't automatically recognize more clear. Mention the span id and the instrumentation library.
62
+ - [6b9b814d](https://github.com/appsignal/appsignal-ruby/commit/6b9b814d958ca0a13f6da312746c11481bb46cfb) patch - Fix an issue where queries containing a MySQL leading type indicator would only be partially sanitised.
63
+
64
+ ### Fixed
65
+
66
+ - [e0f7b0e5](https://github.com/appsignal/appsignal-ruby/commit/e0f7b0e52eb5ed886d0f72941bd1c3c8fe15c9c0) patch - Add more testing to JRuby extension installation to better report the installation result and any possible failures.
67
+
68
+ ## 3.5.4
69
+
70
+ ### Changed
71
+
72
+ - [1a863490](https://github.com/appsignal/appsignal-ruby/commit/1a863490046318b8cee5fff2ac341fb73065f252) patch - Fix disk usage returning a Vec with no entries on Alpine Linux when the `df --local` command fails.
73
+
74
+ ### Deprecated
75
+
76
+ - [bb98744b](https://github.com/appsignal/appsignal-ruby/commit/bb98744b1b6d34db71b5f46279b1a9b26039bd0f) patch - Deprecate the `Appsignal.set_host_gauge` and `Appsignal.set_process_gauge` helper methods in the Ruby gem. These methods would already log deprecation warnings in the `appsignal.log` file, but now also as a Ruby warning. These methods will be removed in the next major version. These methods already did not report any metrics, and still do not.
77
+
78
+ ### Removed
79
+
80
+ - [1a863490](https://github.com/appsignal/appsignal-ruby/commit/1a863490046318b8cee5fff2ac341fb73065f252) patch - Remove the `appsignal_set_host_gauge` and `appsignal_set_process_gauge` extension functions. These functions were already deprecated and did not report any metrics.
81
+
82
+ ### Fixed
83
+
84
+ - [0637b71d](https://github.com/appsignal/appsignal-ruby/commit/0637b71dedde155a2494c56f69bf3217e87e851d) patch - Fix the Makefile log path inclusion in the diagnose report. The diagnose tool didn't look in the correct gem extension directory for this log file.
85
+ - [fe71d78b](https://github.com/appsignal/appsignal-ruby/commit/fe71d78b2c897203bac5e6225bc1e21c6ba2c168) patch - Fix reporting of the Ruby syntax version and JRuby version in install report better.
86
+
87
+ ## 3.5.3
88
+
89
+ ### Changed
90
+
91
+ - [50708677](https://github.com/appsignal/appsignal-ruby/commit/50708677d3c1b3e630035f5b90458ecefa98e41c) patch - Log a warning when no mountpoints are found to report the disk usage metrics. This scenario shouldn't happen (it should log an error, message about skipping a mountpoint or log the disk usage). Log a warning to detect if this issue really occurs.
92
+
93
+ ## 3.5.2
94
+
95
+ ### Fixed
96
+
97
+ - [a5963f65](https://github.com/appsignal/appsignal-ruby/commit/a5963f65cd06cdc0f6482be34917c365affc87dd) patch - Fix Ruby Logger 1.6.0 compatibility
98
+
99
+ ## 3.5.1
100
+
101
+ ### Fixed
102
+
103
+ - [2e93182b](https://github.com/appsignal/appsignal-ruby/commit/2e93182b6ae83b16fe9885558cd8f0bfce6a9a5f) patch - Fix an error in the diagnose report when reading a file's contents results in an "Invalid seek" error. This could happen when the log path is configured to `/dev/stdout`, which is not supported.
104
+ - [ae0b779b](https://github.com/appsignal/appsignal-ruby/commit/ae0b779b3ec00cc46291bc0373d748d720231e74) patch - Fix logger compatibility with Ruby 3.3
105
+
106
+ ## 3.5.0
107
+
108
+ ### Added
109
+
110
+ - [cee1676f](https://github.com/appsignal/appsignal-ruby/commit/cee1676fc5539e380c58e8a824b5c59c3c927119) minor - Nested errors are now supported. The error causes are stored as sample data on the transaction so they can be displayed in the UI.
111
+
112
+ ## 3.4.16
113
+
114
+ ### Changed
115
+
116
+ - [2149c064](https://github.com/appsignal/appsignal-ruby/commit/2149c064be917d2784c4e5571fdfbd0c2ade59ca) patch - Filter more disk mountpoints for disk usage and disk IO stats. This helps reduce noise in the host metrics by focussing on more important mountpoints.
117
+
118
+ The following mountpoint are ignored. Any mountpoint containing:
119
+
120
+ - `/etc/hostname`
121
+ - `/etc/hosts`
122
+ - `/etc/resolv.conf`
123
+ - `/snap/`
124
+ - `/proc/`
125
+
126
+ ### Fixed
127
+
128
+ - [2149c064](https://github.com/appsignal/appsignal-ruby/commit/2149c064be917d2784c4e5571fdfbd0c2ade59ca) patch - - Support disk usage reporting (using `df`) on Alpine Linux. This host metric would report an error on Alpine Linux.
129
+ - When a disk mountpoint has no inodes usage percentage, skip the mountpoint, and report the inodes information successfully for the inodes that do have an inodes usage percentage.
130
+
131
+ ## 3.4.15
132
+
133
+ ### Changed
134
+
135
+ - [3fe0fa7a](https://github.com/appsignal/appsignal-ruby/commit/3fe0fa7a9cfbee0ca9f3e054155b236bd87c22fb) patch - Bump agent to eec7f7b
136
+
137
+ Updated the probes dependency to 0.5.2. CPU usage is now normalized to the number of CPUs available to the container. This means that a container with 2 CPUs will have its CPU usage reported as 50% when using 1 CPU instead of 100%. This is a breaking change for anyone using the cpu probe.
138
+
139
+ If you have CPU triggers set up based on the old behaviour, you might need to update those to these new normalized values to get the same behaviour. Note that this is needed only if the AppSignal integration package you're using includes this change.
140
+
141
+ ## 3.4.14
142
+
143
+ ### Changed
144
+
145
+ - [bd15ec20](https://github.com/appsignal/appsignal-ruby/commit/bd15ec204474efdc504973609b70074148032618) patch - Bump agent to e8207c1.
146
+
147
+ - Add `memory_in_percentages` and `swap_in_percentages` host metrics that represents metrics in percentages.
148
+ - Ignore `/snap/` disk mountpoints.
149
+ - Fix issue with the open span count in logs being logged as a negative number.
150
+ - Fix agent's TCP server getting stuck when two requests are made within the same fraction of a second.
151
+ - [09b45c80](https://github.com/appsignal/appsignal-ruby/commit/09b45c808c2d4b215bd38211860e8e89225886e6) patch - Bump agent to b604345.
152
+
153
+ - Add an exponential backoff to the retry sleep time to bind to the StatsD, NGINX and OpenTelemetry exporter ports. This gives the agent a longer time to connect to the ports if they become available within a 4 minute window.
154
+ - Changes to the agent logger:
155
+ - Logs from the agent and extension now use a more consistent format in logs for spans and transactions.
156
+ - Logs that are for more internal use are moved to the trace log level and logs that are useful for debugging most support issues are moved to the debug log level. It should not be necessary to use log level 'trace' as often anymore. The 'debug' log level should be enough.
157
+ - Add `running_in_container` to agent diagnose report, to be used primarily by the Python package as a way to detect if an app's host is a container or not.
158
+ - [1945d613](https://github.com/appsignal/appsignal-ruby/commit/1945d61326266e225f13c6b828c51faf13c3745b) patch - Bump agent to 1dd2a18.
159
+
160
+ - When adding an SQL body attribute via the extension, instead of truncating the body first and sanitising it later, sanitise it first and truncate it later. This prevents an issue where queries containing very big values result in truncated sanitisations.
161
+
162
+ ### Fixed
163
+
164
+ - [c8698dca](https://github.com/appsignal/appsignal-ruby/commit/c8698dca465d84fdac33d88debc6fbb004458bf1) patch - Fix a deprecation warning for Sidekiq 7.1.6+ when an error is reported to AppSignal. (Thanks @bdewater-thatch!)
165
+ - [1c606c6a](https://github.com/appsignal/appsignal-ruby/commit/1c606c6a095ac9316cdb6fc26b98c72b9c23b583) patch - Fix an internal error when some Redis info keys we're expecting are missing. This will fix the Sidekiq dashboard showing much less data than we can report when Redis is configured to not report all the data points we expect. You'll still miss out of metrics like used memory, but miss less data than before.
166
+
3
167
  ## 3.4.13
4
168
 
5
169
  ### Added
data/README.md CHANGED
@@ -253,6 +253,8 @@ BUNDLE_GEMFILE=gemfiles/sequel-435.gemfile bundle exec rspec
253
253
  BUNDLE_GEMFILE=gemfiles/sequel.gemfile bundle exec rspec
254
254
  BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec
255
255
  BUNDLE_GEMFILE=gemfiles/webmachine.gemfile bundle exec rspec
256
+ BUNDLE_GEMFILE=gemfiles/redis-4.gemfile bundle exec rspec
257
+ BUNDLE_GEMFILE=gemfiles/redis-5.gemfile bundle exec rspec
256
258
  ```
257
259
 
258
260
  If you have either [RVM][rvm], [rbenv][rbenv] or [chruby][chruby] installed you
data/Rakefile CHANGED
@@ -34,7 +34,9 @@ def build_task(matrix, ruby_version, type = nil)
34
34
  "task" => {
35
35
  "prologue" => matrix["prologue"].merge(
36
36
  "commands" => matrix["prologue"]["commands"] + [
37
- "./support/bundler_wrapper exec rake extension:install"
37
+ "./support/bundler_wrapper exec rake extension:install",
38
+ "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report file found'", # rubocop:disable Metrics/LineLength
39
+ "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
38
40
  ]
39
41
  ),
40
42
  "epilogue" => matrix["epilogue"],
data/build_matrix.yml CHANGED
@@ -5,7 +5,7 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
5
5
  agent:
6
6
  machine:
7
7
  type: e1-standard-2
8
- os_image: ubuntu1804
8
+ os_image: ubuntu2004
9
9
 
10
10
  # Cancel all running and queued workflows before this one
11
11
  auto_cancel:
@@ -18,19 +18,13 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
18
18
  - name: RUNNING_IN_CI
19
19
  value: "true"
20
20
  - name: _BUNDLER_CACHE
21
- value: "v2"
21
+ value: "v3"
22
22
  - name: _GEMS_CACHE
23
- value: "v2"
23
+ value: "v3"
24
24
  prologue:
25
25
  commands:
26
26
  - checkout
27
27
  - rm -f $HOME/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d/exec/~gem-rehash.bash
28
- - |
29
- if [ -n "$_C_VERSION" ]; then
30
- sem-version c $_C_VERSION
31
- else
32
- echo Skipping C-lang install
33
- fi
34
28
  - |
35
29
  if [ -n "$RUBY_VERSION" ]; then
36
30
  if ! (sem-version ruby "$RUBY_VERSION"); then
@@ -114,6 +108,8 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
114
108
  - cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-diagnose-$(checksum Gemfile)
115
109
  - ./support/bundler_wrapper install --jobs=3 --retry=3
116
110
  - ./support/bundler_wrapper exec rake extension:install
111
+ - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report file found'"
112
+ - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
117
113
  - git submodule init
118
114
  - git submodule update
119
115
  jobs:
@@ -153,10 +149,6 @@ matrix:
153
149
  commands:
154
150
  - cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec) .bundle
155
151
  - cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE)-$(checksum appsignal.gemspec) $HOME/.gem
156
- on_fail:
157
- commands:
158
- - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report file found'"
159
- - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'"
160
152
 
161
153
  defaults:
162
154
  rubygems: "latest"
@@ -247,3 +239,5 @@ matrix:
247
239
  - gem: "sinatra"
248
240
  - gem: "webmachine1"
249
241
  - gem: "webmachine2"
242
+ - gem: "redis-4"
243
+ - gem: "redis-5"
data/ext/Rakefile CHANGED
@@ -16,6 +16,7 @@ task :default do
16
16
 
17
17
  library_type = "dynamic"
18
18
  report["language"]["implementation"] = "jruby"
19
+ report["language"]["implementation_version"] = JRUBY_VERSION
19
20
  report["build"]["library_type"] = library_type
20
21
  next unless check_architecture
21
22
 
@@ -28,8 +29,14 @@ task :default do
28
29
 
29
30
  unarchive(archive)
30
31
  end
32
+
33
+ # Have the extension loader raise the error if it encountes a problem
34
+ ENV["_APPSIGNAL_EXTENSION_INSTALL"] = "true"
35
+ # Load the extension to test if all functions can be "attached" with FFI
36
+ require File.expand_path("../lib/appsignal/extension/jruby.rb", __dir__)
37
+
31
38
  successful_installation
32
- rescue => e
39
+ rescue StandardError, LoadError => e
33
40
  fail_installation_with_error(e)
34
41
  ensure
35
42
  create_dummy_makefile unless installation_succeeded?