appsignal 3.5.4 → 3.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.semaphore/semaphore.yml +147 -9
  3. data/CHANGELOG.md +17 -0
  4. data/README.md +2 -0
  5. data/build_matrix.yml +5 -9
  6. data/ext/Rakefile +7 -1
  7. data/ext/agent.rb +27 -27
  8. data/gemfiles/redis-4.gemfile +5 -0
  9. data/gemfiles/redis-5.gemfile +6 -0
  10. data/lib/appsignal/cli/diagnose.rb +1 -1
  11. data/lib/appsignal/config.rb +9 -4
  12. data/lib/appsignal/environment.rb +24 -13
  13. data/lib/appsignal/event_formatter.rb +1 -1
  14. data/lib/appsignal/extension/jruby.rb +4 -3
  15. data/lib/appsignal/extension.rb +1 -1
  16. data/lib/appsignal/helpers/instrumentation.rb +7 -7
  17. data/lib/appsignal/helpers/metrics.rb +3 -3
  18. data/lib/appsignal/hooks/redis.rb +1 -0
  19. data/lib/appsignal/hooks/redis_client.rb +27 -0
  20. data/lib/appsignal/hooks.rb +3 -2
  21. data/lib/appsignal/integrations/hanami.rb +1 -1
  22. data/lib/appsignal/integrations/padrino.rb +1 -1
  23. data/lib/appsignal/integrations/railtie.rb +1 -1
  24. data/lib/appsignal/integrations/redis_client.rb +20 -0
  25. data/lib/appsignal/integrations/sidekiq.rb +1 -1
  26. data/lib/appsignal/integrations/sinatra.rb +1 -1
  27. data/lib/appsignal/minutely.rb +4 -4
  28. data/lib/appsignal/probes/gvl.rb +1 -1
  29. data/lib/appsignal/probes/helpers.rb +1 -1
  30. data/lib/appsignal/probes/mri.rb +1 -1
  31. data/lib/appsignal/probes/sidekiq.rb +5 -5
  32. data/lib/appsignal/rack/generic_instrumentation.rb +1 -1
  33. data/lib/appsignal/rack/rails_instrumentation.rb +2 -2
  34. data/lib/appsignal/rack/sinatra_instrumentation.rb +2 -2
  35. data/lib/appsignal/rack/streaming_listener.rb +1 -1
  36. data/lib/appsignal/span.rb +2 -2
  37. data/lib/appsignal/transaction.rb +11 -11
  38. data/lib/appsignal/utils/deprecation_message.rb +2 -2
  39. data/lib/appsignal/version.rb +1 -1
  40. data/lib/appsignal.rb +37 -31
  41. data/spec/lib/appsignal/config_spec.rb +2 -2
  42. data/spec/lib/appsignal/hooks/activejob_spec.rb +1 -1
  43. data/spec/lib/appsignal/hooks/redis_client_spec.rb +222 -0
  44. data/spec/lib/appsignal/hooks/redis_spec.rb +98 -76
  45. data/spec/lib/appsignal/hooks_spec.rb +4 -4
  46. data/spec/lib/appsignal/integrations/railtie_spec.rb +2 -2
  47. data/spec/lib/appsignal/integrations/sidekiq_spec.rb +3 -3
  48. data/spec/lib/appsignal/integrations/sinatra_spec.rb +2 -2
  49. data/spec/lib/appsignal/minutely_spec.rb +2 -2
  50. data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +1 -1
  51. data/spec/lib/appsignal/transaction_spec.rb +4 -4
  52. data/spec/lib/appsignal_spec.rb +34 -32
  53. data/spec/spec_helper.rb +1 -1
  54. data/spec/support/helpers/config_helpers.rb +6 -2
  55. data/spec/support/helpers/dependency_helper.rb +9 -1
  56. data/spec/support/helpers/log_helpers.rb +2 -2
  57. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a6954ece5998e4e0da9e07e3835f138ea1090f24fcae785268659c6756f24db
4
- data.tar.gz: aec02be38c6030f17f62f82a3b625bd944145d8f74f0801a743f263e4be35a99
3
+ metadata.gz: d3267960e538cd5adc0ee8f5eb3262da34e31f73a7e476229986a04530608a2d
4
+ data.tar.gz: 8e095d524c562120f15fc8bf983459488dc1e6d537bf20490855057d76eb119e
5
5
  SHA512:
6
- metadata.gz: '0549c6c428bdc4962f3e12ed3ca1f69672c337ae570c3785330c1fe54e47886d6d716d8c3f47178929b3f22eb3f31523d47494cf1f64bd2e96b572386d46737f'
7
- data.tar.gz: 80caacd2803317991bdb0c8197b0ea339a17642e1325a1418bdb88a4111295199e685f6594cc2caf07b36f993e2dbaa7b3a67adb6faeac298baf41827fa39cad
6
+ metadata.gz: c72a0a85dc9f4c448692c15d3d87ce1d34e858beed3ed3e211d121348fe756f4f3ccae4b1606edc96b74aed0cbf8d789eeb209bc68e5ee1384d724664daca94c
7
+ data.tar.gz: cbacece1707e5c1b7ddc473863f5aa9bacbb317979827f1e752957dd9ec72270b1bbd5baf4637fa4ba37f03b471fdbd7c22ebb7bcf63a07d322a91952af1e746
@@ -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
@@ -500,6 +494,42 @@ blocks:
500
494
  value: latest
501
495
  commands:
502
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"
503
533
  - name: Ruby 3.0.5
504
534
  dependencies:
505
535
  - Validation
@@ -899,6 +929,42 @@ blocks:
899
929
  value: latest
900
930
  commands:
901
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"
902
968
  - name: Ruby 3.1.3
903
969
  dependencies:
904
970
  - Validation
@@ -1280,6 +1346,42 @@ blocks:
1280
1346
  value: latest
1281
1347
  commands:
1282
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"
1283
1385
  - name: Ruby 3.2.1
1284
1386
  dependencies:
1285
1387
  - Validation
@@ -1661,6 +1763,42 @@ blocks:
1661
1763
  value: latest
1662
1764
  commands:
1663
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"
1664
1802
  - name: Ruby jruby-9.4.1.0
1665
1803
  dependencies:
1666
1804
  - Validation
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.5.5
4
+
5
+ _Published on 2024-02-01._
6
+
7
+ ### Added
8
+
9
+ - [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.
10
+
11
+ ### Changed
12
+
13
+ - [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.
14
+ - [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.
15
+
16
+ ### Fixed
17
+
18
+ - [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.
19
+
3
20
  ## 3.5.4
4
21
 
5
22
  ### Changed
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/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
@@ -245,3 +239,5 @@ matrix:
245
239
  - gem: "sinatra"
246
240
  - gem: "webmachine1"
247
241
  - gem: "webmachine2"
242
+ - gem: "redis-4"
243
+ - gem: "redis-5"
data/ext/Rakefile CHANGED
@@ -29,8 +29,14 @@ task :default do
29
29
 
30
30
  unarchive(archive)
31
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
+
32
38
  successful_installation
33
- rescue => e
39
+ rescue StandardError, LoadError => e
34
40
  fail_installation_with_error(e)
35
41
  ensure
36
42
  create_dummy_makefile unless installation_succeeded?
data/ext/agent.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  # Modifications to this file will be overwritten with the next agent release.
7
7
 
8
8
  APPSIGNAL_AGENT_CONFIG = {
9
- "version" => "bfe19b1",
9
+ "version" => "0.31.2",
10
10
  "mirrors" => [
11
11
  "https://appsignal-agent-releases.global.ssl.fastly.net",
12
12
  "https://d135dj0rjqvssy.cloudfront.net"
@@ -14,131 +14,131 @@ APPSIGNAL_AGENT_CONFIG = {
14
14
  "triples" => {
15
15
  "x86_64-darwin" => {
16
16
  "static" => {
17
- "checksum" => "0985697683dc7f2bc0a353b637e3923a79b1945f730deceba73f65807cdcbb16",
17
+ "checksum" => "42cdf814a89e5d6bd6e5cd9ba84103df82b43418012bb4f9251e98d0c3627759",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "ffa15b479a03b31a218d88fd0d381d93bd515073bf1e665a5ed6d6147e5f460f",
21
+ "checksum" => "7497d64b125849d306ebca71a2a2ce83e3f76dbfbc809b43b5948e12b7351b96",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "0985697683dc7f2bc0a353b637e3923a79b1945f730deceba73f65807cdcbb16",
27
+ "checksum" => "42cdf814a89e5d6bd6e5cd9ba84103df82b43418012bb4f9251e98d0c3627759",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "ffa15b479a03b31a218d88fd0d381d93bd515073bf1e665a5ed6d6147e5f460f",
31
+ "checksum" => "7497d64b125849d306ebca71a2a2ce83e3f76dbfbc809b43b5948e12b7351b96",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "8fe7adac3f265d47f9bff244b357b11551065c15542e22c5e5a10afa7d3d18f9",
37
+ "checksum" => "8db9e31e090e767b1157d969521967f322be9dd73eb1b677b6192eb4c987af72",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "336918dfa41a4252b7a2cf8250013ee210a45def3d5893eb58ca6bba71c25320",
41
+ "checksum" => "612d68620836b324bc61d8d4fd42630e50641116688ac78f2a7c806e2ee10ad1",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "8fe7adac3f265d47f9bff244b357b11551065c15542e22c5e5a10afa7d3d18f9",
47
+ "checksum" => "8db9e31e090e767b1157d969521967f322be9dd73eb1b677b6192eb4c987af72",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "336918dfa41a4252b7a2cf8250013ee210a45def3d5893eb58ca6bba71c25320",
51
+ "checksum" => "612d68620836b324bc61d8d4fd42630e50641116688ac78f2a7c806e2ee10ad1",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "8fe7adac3f265d47f9bff244b357b11551065c15542e22c5e5a10afa7d3d18f9",
57
+ "checksum" => "8db9e31e090e767b1157d969521967f322be9dd73eb1b677b6192eb4c987af72",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "336918dfa41a4252b7a2cf8250013ee210a45def3d5893eb58ca6bba71c25320",
61
+ "checksum" => "612d68620836b324bc61d8d4fd42630e50641116688ac78f2a7c806e2ee10ad1",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "8278a46232ab0b88dfbd5276a7253f147a950ea0f55ebb104ef825a528d24b73",
67
+ "checksum" => "72873d1c7ad2d4d744fe3dd4370fb07b4c9d8a4f4d87febb8dbe08c532eebff8",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "43f737a65dae52bc2118fcb1ba0fcf35774eb5e62a1d74c0e9d3f9713c1ff1ca",
71
+ "checksum" => "b1510e425a0719cc7e7fe08e760c4794ece81108647ef73babffbb1eec93b5c7",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "2b0cfc65ccd05d1258719e73fc19323729100d02a33d936ba79bb12cdede3763",
77
+ "checksum" => "8779fdd2f02b034463900456b5b65a92d3a9165b87ba896b01baded96729685a",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "7b163e29e6db10b21295bbdbc06c31a8158522a0a14bd4cbaf4d71a8ac432902",
81
+ "checksum" => "be30f7ff817a048af9f133ffd0da5c408f50b38e75bb3f25e47cd3916d5e4fac",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "2b0cfc65ccd05d1258719e73fc19323729100d02a33d936ba79bb12cdede3763",
87
+ "checksum" => "8779fdd2f02b034463900456b5b65a92d3a9165b87ba896b01baded96729685a",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "7b163e29e6db10b21295bbdbc06c31a8158522a0a14bd4cbaf4d71a8ac432902",
91
+ "checksum" => "be30f7ff817a048af9f133ffd0da5c408f50b38e75bb3f25e47cd3916d5e4fac",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "10bafbef6445ea1a37529b34fb103dd48e185f61f19f58f573377127d03f6a60",
97
+ "checksum" => "36fc29655d13e4dfe7bcbe2c798bfc16d68194610ff354d43e977f3768f31458",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "bc6a5ffea46fc3e440a580344340e5dd0274372aae34132957707be0c0dc0bd2",
101
+ "checksum" => "d37e57f55f44ac88a2b803fc17942f60137fbfa819134388941d22f579518170",
102
102
  "filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
103
103
  }
104
104
  },
105
105
  "x86_64-linux-musl" => {
106
106
  "static" => {
107
- "checksum" => "fba0b10a3dcac0854cd9d19773ab48649fc79a35261eacdfe28d6e70c267b98a",
107
+ "checksum" => "59b6cef9797746da9d6717effc0892a2f2219767734a0e76f8b3d1578dc0d9e0",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "50f1c3f9102adb666ec27ac4aaab27193bf8896d64e3b4a2ba94c042f04f1cb7",
111
+ "checksum" => "703d657ee15b69563c000fe150e368a91a12c9b39f16976f23a4b191284204f3",
112
112
  "filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
113
113
  }
114
114
  },
115
115
  "aarch64-linux-musl" => {
116
116
  "static" => {
117
- "checksum" => "98e8aafa0f688b1f1a9c37daf9e9cc1e36edc7e0ad65f86d8402469d15b6a1d6",
117
+ "checksum" => "ec3ab8fcc20d1f31df6003e2ca3dcf257abfeddd1b7912fa6189f1f6905a89ab",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "55dfab323718bc731678ff1268c9fa2e78de37ab39fb8b46aa806bfd41df4212",
121
+ "checksum" => "b7a00a09b7e10f500b54913feefd6a16873849324f0e8ec65b36c58bdc1901b0",
122
122
  "filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
123
123
  }
124
124
  },
125
125
  "x86_64-freebsd" => {
126
126
  "static" => {
127
- "checksum" => "09ebc6406d81fdf81b2e76bef6c1344f34292e1b3727f7fc984c8df5c7698db5",
127
+ "checksum" => "bd654d5c555f6006e4145d76e27f02c5d22b285f411675a520455d6db6c8e165",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "cdab19e2e6d5f6ad15f3d87f735cd867e7c54db0412c893c39de3521afd9b6d3",
131
+ "checksum" => "b06445f38b7b8b3e47f407540fb24f196dbf0a84583a2ad7f25bbba750930108",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "09ebc6406d81fdf81b2e76bef6c1344f34292e1b3727f7fc984c8df5c7698db5",
137
+ "checksum" => "bd654d5c555f6006e4145d76e27f02c5d22b285f411675a520455d6db6c8e165",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "cdab19e2e6d5f6ad15f3d87f735cd867e7c54db0412c893c39de3521afd9b6d3",
141
+ "checksum" => "b06445f38b7b8b3e47f407540fb24f196dbf0a84583a2ad7f25bbba750930108",
142
142
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
143
143
  }
144
144
  }
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'redis', "~> 4.0"
4
+
5
+ gemspec :path => '../'
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'redis', '~> 5.0'
4
+ gem 'hiredis-client'
5
+
6
+ gemspec :path => '../'
@@ -201,7 +201,7 @@ module Appsignal
201
201
  )
202
202
  Appsignal.config.write_to_environment
203
203
  Appsignal.start_logger
204
- Appsignal.logger.info("Starting AppSignal diagnose")
204
+ Appsignal.internal_logger.info("Starting AppSignal diagnose")
205
205
  end
206
206
 
207
207
  def run_agent_diagnose_mode
@@ -219,8 +219,8 @@ module Appsignal
219
219
  # use. This will be overwritten by the file config and environment
220
220
  # variables config.
221
221
  # @param logger [Logger] The logger to use for the AppSignal gem. This is
222
- # used by the configuration class only. Default: {Appsignal.logger}. See
223
- # also {Appsignal.start_logger}.
222
+ # used by the configuration class only. Default:
223
+ # {Appsignal.internal_logger}. See also {Appsignal.start_logger}.
224
224
  # @param config_file [String] Custom config file location. Default
225
225
  # `config/appsignal.yml`.
226
226
  #
@@ -230,8 +230,13 @@ module Appsignal
230
230
  # Configuration load order
231
231
  # @see https://docs.appsignal.com/ruby/instrumentation/integrating-appsignal.html
232
232
  # How to integrate AppSignal manually
233
- def initialize(root_path, env, initial_config = {}, logger = Appsignal.logger,
234
- config_file = nil)
233
+ def initialize(
234
+ root_path,
235
+ env,
236
+ initial_config = {},
237
+ logger = Appsignal.internal_logger,
238
+ config_file = nil
239
+ )
235
240
  @config_file_error = false
236
241
  @root_path = root_path
237
242
  @config_file = config_file
@@ -10,9 +10,9 @@ module Appsignal
10
10
  #
11
11
  # The value of the environment metadata is given as a block that captures
12
12
  # errors that might be raised while fetching the value. It will not
13
- # re-raise errors, but instead log them using the {Appsignal.logger}. This
14
- # ensures AppSignal will not cause an error in the application when
15
- # collecting this metadata.
13
+ # re-raise errors, but instead log them using the
14
+ # {Appsignal.internal_logger}. This ensures AppSignal will not cause an
15
+ # error in the application when collecting this metadata.
16
16
  #
17
17
  # @example Reporting a key and value
18
18
  # Appsignal::Environment.report("ruby_version") { RUBY_VERSION }
@@ -34,8 +34,8 @@ module Appsignal
34
34
  when String
35
35
  key
36
36
  else
37
- Appsignal.logger.error "Unable to report on environment metadata: " \
38
- "Unsupported value type for #{key.inspect}"
37
+ Appsignal.internal_logger.error "Unable to report on environment " \
38
+ "metadata: Unsupported value type for #{key.inspect}"
39
39
  return
40
40
  end
41
41
 
@@ -43,7 +43,7 @@ module Appsignal
43
43
  begin
44
44
  yield
45
45
  rescue => e
46
- Appsignal.logger.error \
46
+ Appsignal.internal_logger.error \
47
47
  "Unable to report on environment metadata #{key.inspect}:\n" \
48
48
  "#{e.class}: #{e}"
49
49
  return
@@ -56,26 +56,35 @@ module Appsignal
56
56
  when String
57
57
  yielded_value
58
58
  else
59
- Appsignal.logger.error "Unable to report on environment metadata " \
60
- "#{key.inspect}: Unsupported value type for " \
59
+ Appsignal.internal_logger.error "Unable to report on environment " \
60
+ "metadata #{key.inspect}: Unsupported value type for " \
61
61
  "#{yielded_value.inspect}"
62
62
  return
63
63
  end
64
64
 
65
65
  Appsignal::Extension.set_environment_metadata(key, value)
66
66
  rescue => e
67
- Appsignal.logger.error "Unable to report on environment metadata:\n" \
68
- "#{e.class}: #{e}"
67
+ Appsignal.internal_logger.error "Unable to report on environment " \
68
+ "metadata:\n#{e.class}: #{e}"
69
69
  end
70
70
 
71
71
  # @see report_supported_gems
72
72
  SUPPORTED_GEMS = %w[
73
73
  actioncable
74
+ actionmailer
74
75
  activejob
76
+ activerecord
75
77
  capistrano
76
78
  celluloid
77
79
  data_mapper
78
80
  delayed_job
81
+ dry-monitor
82
+ elasticsearch
83
+ excon
84
+ faraday
85
+ gvltools
86
+ hanami
87
+ hiredis
79
88
  mongo_ruby_driver
80
89
  padrino
81
90
  passenger
@@ -85,7 +94,9 @@ module Appsignal
85
94
  rails
86
95
  rake
87
96
  redis
97
+ redis-client
88
98
  resque
99
+ rom
89
100
  sequel
90
101
  shoryuken
91
102
  sidekiq
@@ -114,15 +125,15 @@ module Appsignal
114
125
  report("ruby_#{gem_name}_version") { gem_spec.version.to_s }
115
126
  end
116
127
  rescue => e
117
- Appsignal.logger.error "Unable to report supported gems:\n" \
128
+ Appsignal.internal_logger.error "Unable to report supported gems:\n" \
118
129
  "#{e.class}: #{e}"
119
130
  end
120
131
 
121
132
  def self.report_enabled(feature)
122
133
  Appsignal::Environment.report("ruby_#{feature}_enabled") { true }
123
134
  rescue => e
124
- Appsignal.logger.error "Unable to report integration enabled:\n" \
125
- "#{e.class}: #{e}"
135
+ Appsignal.internal_logger.error "Unable to report integration " \
136
+ "enabled:\n#{e.class}: #{e}"
126
137
  end
127
138
  end
128
139
  end
@@ -73,7 +73,7 @@ module Appsignal
73
73
  end
74
74
 
75
75
  def logger
76
- Appsignal.logger
76
+ Appsignal.internal_logger
77
77
  end
78
78
  end
79
79
 
@@ -242,14 +242,15 @@ module Appsignal
242
242
  [:pointer],
243
243
  :appsignal_string
244
244
 
245
- Appsignal.extension_loaded = true
245
+ Appsignal.extension_loaded = true if Appsignal.respond_to? :extension_loaded=
246
246
  rescue LoadError => error
247
247
  error_message = "ERROR: AppSignal failed to load extension. " \
248
248
  "Please run `appsignal diagnose` and email us at support@appsignal.com\n" \
249
249
  "#{error.class}: #{error.message}"
250
- Appsignal.logger.error(error_message)
250
+ Appsignal.internal_logger.error(error_message) if Appsignal.respond_to? :internal_logger
251
251
  Kernel.warn error_message
252
- Appsignal.extension_loaded = false
252
+ Appsignal.extension_loaded = false if Appsignal.respond_to? :extension_loaded=
253
+ raise error if ENV["_APPSIGNAL_EXTENSION_INSTALL"] == "true"
253
254
  end
254
255
 
255
256
  def start
@@ -12,7 +12,7 @@ rescue LoadError => error
12
12
  error_message = "ERROR: AppSignal failed to load extension. " \
13
13
  "Please run `appsignal diagnose` and email us at support@appsignal.com\n" \
14
14
  "#{error.class}: #{error.message}"
15
- Appsignal.logger.error(error_message)
15
+ Appsignal.internal_logger.error(error_message)
16
16
  Kernel.warn error_message
17
17
  Appsignal.extension_loaded = false
18
18
  end