appsignal 4.0.4 → 4.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +151 -16
  3. data/CHANGELOG.md +42 -0
  4. data/build_matrix.yml +2 -1
  5. data/ext/agent.rb +27 -27
  6. data/gemfiles/que-1.gemfile +5 -0
  7. data/gemfiles/que-2.gemfile +5 -0
  8. data/lib/appsignal/check_in/scheduler.rb +3 -4
  9. data/lib/appsignal/config.rb +7 -0
  10. data/lib/appsignal/hooks/at_exit.rb +1 -0
  11. data/lib/appsignal/hooks/puma.rb +5 -1
  12. data/lib/appsignal/integrations/puma.rb +45 -0
  13. data/lib/appsignal/integrations/que.rb +8 -2
  14. data/lib/appsignal/rack/abstract_middleware.rb +3 -47
  15. data/lib/appsignal/rack/event_handler.rb +2 -0
  16. data/lib/appsignal/rack/hanami_middleware.rb +5 -1
  17. data/lib/appsignal/rack.rb +68 -0
  18. data/lib/appsignal/version.rb +1 -1
  19. data/spec/lib/appsignal/check_in/cron_spec.rb +134 -134
  20. data/spec/lib/appsignal/check_in/scheduler_spec.rb +297 -224
  21. data/spec/lib/appsignal/config_spec.rb +13 -0
  22. data/spec/lib/appsignal/hooks/at_exit_spec.rb +11 -0
  23. data/spec/lib/appsignal/hooks/puma_spec.rb +31 -23
  24. data/spec/lib/appsignal/integrations/puma_spec.rb +150 -0
  25. data/spec/lib/appsignal/integrations/que_spec.rb +56 -21
  26. data/spec/lib/appsignal/probes_spec.rb +4 -6
  27. data/spec/lib/appsignal/rack/abstract_middleware_spec.rb +41 -122
  28. data/spec/lib/appsignal/rack_spec.rb +180 -0
  29. data/spec/lib/appsignal/transaction_spec.rb +96 -92
  30. data/spec/spec_helper.rb +6 -7
  31. data/spec/support/helpers/api_request_helper.rb +40 -0
  32. data/spec/support/helpers/config_helpers.rb +2 -1
  33. data/spec/support/helpers/dependency_helper.rb +5 -0
  34. data/spec/support/matchers/contains_log.rb +10 -3
  35. data/spec/support/mocks/hash_like.rb +10 -0
  36. data/spec/support/mocks/puma_mock.rb +43 -0
  37. data/spec/support/testing.rb +9 -0
  38. metadata +8 -3
  39. data/gemfiles/que.gemfile +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91e5aad04da2524d3d2f4bd983ecd76cf1a33380a1bc2a6bf8aab1bd4d91db5b
4
- data.tar.gz: c7d0582debd5c6d9ed29f2239a4baeed92ebdad46606c423e7537495b4dea3ab
3
+ metadata.gz: 56b2612f4a08ef06098564e1790174e1ac702ac881762e7ed66361252b5f1af9
4
+ data.tar.gz: 49fde92e090fefb11562226d38618492b9d2af16320c6a9f52a790481be0dd87
5
5
  SHA512:
6
- metadata.gz: a482b32ffa5d9ddc805a65507ab4d526f9c299969c86123743e8f0c4830af6f8abd3eecd805cb7c4eec6abcd474a2f97704ac9f5129825b7958245cc973ff6db
7
- data.tar.gz: c0bf6a6ba6454fee105c6890db3154e03c0ad64c6b5ab325fb0186edf99066e923d7b6b4043ea4d77428155fbc58371ece1309517109437edc8cc265ffda554a
6
+ metadata.gz: 7329a509af69af25449d56a227971b63f5030a1c1073f54c2cb8f08acdfaa081a20632f37ce8c19e77ad4f9d6c2d8bdde332c1845356ae3ef92b7440f9ec7afd
7
+ data.tar.gz: b3a93b77cd2d6c60c6266d76e97c7743fd093a6199d134d8b830a71781ebb801a3c31259ceea435d82a8f644a07fcd3ea84dfa3495a9597ff1d7cca7fe3de6eb
@@ -2,7 +2,7 @@
2
2
  # This is a generated file by the `rake build_matrix:github:generate` task.
3
3
  # See `build_matrix.yml` for the build matrix.
4
4
  # Generate this file with `rake build_matrix:github:generate`.
5
- # Generated job count: 117
5
+ # Generated job count: 122
6
6
  ---
7
7
  name: Ruby gem CI
8
8
  'on':
@@ -372,8 +372,8 @@ jobs:
372
372
  JRUBY_OPTS: ''
373
373
  COV: '1'
374
374
  BUNDLE_GEMFILE: gemfiles/psych-4.gemfile
375
- ruby_3-3-4__que_ubuntu-latest:
376
- name: Ruby 3.3.4 - que
375
+ ruby_3-3-4__que-1_ubuntu-latest:
376
+ name: Ruby 3.3.4 - que-1
377
377
  needs: ruby_3-3-4_ubuntu-latest
378
378
  runs-on: ubuntu-latest
379
379
  steps:
@@ -398,7 +398,34 @@ jobs:
398
398
  RAILS_ENV: test
399
399
  JRUBY_OPTS: ''
400
400
  COV: '1'
401
- BUNDLE_GEMFILE: gemfiles/que.gemfile
401
+ BUNDLE_GEMFILE: gemfiles/que-1.gemfile
402
+ ruby_3-3-4__que-2_ubuntu-latest:
403
+ name: Ruby 3.3.4 - que-2
404
+ needs: ruby_3-3-4_ubuntu-latest
405
+ runs-on: ubuntu-latest
406
+ steps:
407
+ - name: Check out repository
408
+ uses: actions/checkout@v4
409
+ - name: Install Ruby
410
+ uses: ruby/setup-ruby@v1
411
+ with:
412
+ ruby-version: 3.3.4
413
+ bundler-cache: true
414
+ - name: Install gem extension
415
+ run: "./support/bundler_wrapper exec rake extension:install"
416
+ - name: Print extension install report
417
+ run: "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
418
+ file found'"
419
+ - name: Print Makefile log file
420
+ run: "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file
421
+ found'"
422
+ - name: Run tests
423
+ run: "./support/bundler_wrapper exec rake test"
424
+ env:
425
+ RAILS_ENV: test
426
+ JRUBY_OPTS: ''
427
+ COV: '1'
428
+ BUNDLE_GEMFILE: gemfiles/que-2.gemfile
402
429
  ruby_3-3-4__rails-6-1_ubuntu-latest:
403
430
  name: Ruby 3.3.4 - rails-6.1
404
431
  needs: ruby_3-3-4_ubuntu-latest
@@ -970,8 +997,35 @@ jobs:
970
997
  JRUBY_OPTS: ''
971
998
  COV: '1'
972
999
  BUNDLE_GEMFILE: gemfiles/psych-4.gemfile
973
- ruby_3-2-5__que_ubuntu-latest:
974
- name: Ruby 3.2.5 - que
1000
+ ruby_3-2-5__que-1_ubuntu-latest:
1001
+ name: Ruby 3.2.5 - que-1
1002
+ needs: ruby_3-2-5_ubuntu-latest
1003
+ runs-on: ubuntu-latest
1004
+ steps:
1005
+ - name: Check out repository
1006
+ uses: actions/checkout@v4
1007
+ - name: Install Ruby
1008
+ uses: ruby/setup-ruby@v1
1009
+ with:
1010
+ ruby-version: 3.2.5
1011
+ bundler-cache: true
1012
+ - name: Install gem extension
1013
+ run: "./support/bundler_wrapper exec rake extension:install"
1014
+ - name: Print extension install report
1015
+ run: "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
1016
+ file found'"
1017
+ - name: Print Makefile log file
1018
+ run: "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file
1019
+ found'"
1020
+ - name: Run tests
1021
+ run: "./support/bundler_wrapper exec rake test"
1022
+ env:
1023
+ RAILS_ENV: test
1024
+ JRUBY_OPTS: ''
1025
+ COV: '1'
1026
+ BUNDLE_GEMFILE: gemfiles/que-1.gemfile
1027
+ ruby_3-2-5__que-2_ubuntu-latest:
1028
+ name: Ruby 3.2.5 - que-2
975
1029
  needs: ruby_3-2-5_ubuntu-latest
976
1030
  runs-on: ubuntu-latest
977
1031
  steps:
@@ -996,7 +1050,7 @@ jobs:
996
1050
  RAILS_ENV: test
997
1051
  JRUBY_OPTS: ''
998
1052
  COV: '1'
999
- BUNDLE_GEMFILE: gemfiles/que.gemfile
1053
+ BUNDLE_GEMFILE: gemfiles/que-2.gemfile
1000
1054
  ruby_3-2-5__rails-6-1_ubuntu-latest:
1001
1055
  name: Ruby 3.2.5 - rails-6.1
1002
1056
  needs: ruby_3-2-5_ubuntu-latest
@@ -1568,8 +1622,35 @@ jobs:
1568
1622
  JRUBY_OPTS: ''
1569
1623
  COV: '1'
1570
1624
  BUNDLE_GEMFILE: gemfiles/psych-4.gemfile
1571
- ruby_3-1-6__que_ubuntu-latest:
1572
- name: Ruby 3.1.6 - que
1625
+ ruby_3-1-6__que-1_ubuntu-latest:
1626
+ name: Ruby 3.1.6 - que-1
1627
+ needs: ruby_3-1-6_ubuntu-latest
1628
+ runs-on: ubuntu-latest
1629
+ steps:
1630
+ - name: Check out repository
1631
+ uses: actions/checkout@v4
1632
+ - name: Install Ruby
1633
+ uses: ruby/setup-ruby@v1
1634
+ with:
1635
+ ruby-version: 3.1.6
1636
+ bundler-cache: true
1637
+ - name: Install gem extension
1638
+ run: "./support/bundler_wrapper exec rake extension:install"
1639
+ - name: Print extension install report
1640
+ run: "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
1641
+ file found'"
1642
+ - name: Print Makefile log file
1643
+ run: "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file
1644
+ found'"
1645
+ - name: Run tests
1646
+ run: "./support/bundler_wrapper exec rake test"
1647
+ env:
1648
+ RAILS_ENV: test
1649
+ JRUBY_OPTS: ''
1650
+ COV: '1'
1651
+ BUNDLE_GEMFILE: gemfiles/que-1.gemfile
1652
+ ruby_3-1-6__que-2_ubuntu-latest:
1653
+ name: Ruby 3.1.6 - que-2
1573
1654
  needs: ruby_3-1-6_ubuntu-latest
1574
1655
  runs-on: ubuntu-latest
1575
1656
  steps:
@@ -1594,7 +1675,7 @@ jobs:
1594
1675
  RAILS_ENV: test
1595
1676
  JRUBY_OPTS: ''
1596
1677
  COV: '1'
1597
- BUNDLE_GEMFILE: gemfiles/que.gemfile
1678
+ BUNDLE_GEMFILE: gemfiles/que-2.gemfile
1598
1679
  ruby_3-1-6__rails-6-1_ubuntu-latest:
1599
1680
  name: Ruby 3.1.6 - rails-6.1
1600
1681
  needs: ruby_3-1-6_ubuntu-latest
@@ -2166,8 +2247,35 @@ jobs:
2166
2247
  JRUBY_OPTS: ''
2167
2248
  COV: '1'
2168
2249
  BUNDLE_GEMFILE: gemfiles/psych-4.gemfile
2169
- ruby_3-0-7__que_ubuntu-latest:
2170
- name: Ruby 3.0.7 - que
2250
+ ruby_3-0-7__que-1_ubuntu-latest:
2251
+ name: Ruby 3.0.7 - que-1
2252
+ needs: ruby_3-0-7_ubuntu-latest
2253
+ runs-on: ubuntu-latest
2254
+ steps:
2255
+ - name: Check out repository
2256
+ uses: actions/checkout@v4
2257
+ - name: Install Ruby
2258
+ uses: ruby/setup-ruby@v1
2259
+ with:
2260
+ ruby-version: 3.0.7
2261
+ bundler-cache: true
2262
+ - name: Install gem extension
2263
+ run: "./support/bundler_wrapper exec rake extension:install"
2264
+ - name: Print extension install report
2265
+ run: "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
2266
+ file found'"
2267
+ - name: Print Makefile log file
2268
+ run: "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file
2269
+ found'"
2270
+ - name: Run tests
2271
+ run: "./support/bundler_wrapper exec rake test"
2272
+ env:
2273
+ RAILS_ENV: test
2274
+ JRUBY_OPTS: ''
2275
+ COV: '1'
2276
+ BUNDLE_GEMFILE: gemfiles/que-1.gemfile
2277
+ ruby_3-0-7__que-2_ubuntu-latest:
2278
+ name: Ruby 3.0.7 - que-2
2171
2279
  needs: ruby_3-0-7_ubuntu-latest
2172
2280
  runs-on: ubuntu-latest
2173
2281
  steps:
@@ -2192,7 +2300,7 @@ jobs:
2192
2300
  RAILS_ENV: test
2193
2301
  JRUBY_OPTS: ''
2194
2302
  COV: '1'
2195
- BUNDLE_GEMFILE: gemfiles/que.gemfile
2303
+ BUNDLE_GEMFILE: gemfiles/que-2.gemfile
2196
2304
  ruby_3-0-7__rails-6-0_ubuntu-latest:
2197
2305
  name: Ruby 3.0.7 - rails-6.0
2198
2306
  needs: ruby_3-0-7_ubuntu-latest
@@ -2683,8 +2791,35 @@ jobs:
2683
2791
  JRUBY_OPTS: ''
2684
2792
  COV: '1'
2685
2793
  BUNDLE_GEMFILE: gemfiles/psych-4.gemfile
2686
- ruby_2-7-8__que_ubuntu-latest:
2687
- name: Ruby 2.7.8 - que
2794
+ ruby_2-7-8__que-1_ubuntu-latest:
2795
+ name: Ruby 2.7.8 - que-1
2796
+ needs: ruby_2-7-8_ubuntu-latest
2797
+ runs-on: ubuntu-latest
2798
+ steps:
2799
+ - name: Check out repository
2800
+ uses: actions/checkout@v4
2801
+ - name: Install Ruby
2802
+ uses: ruby/setup-ruby@v1
2803
+ with:
2804
+ ruby-version: 2.7.8
2805
+ bundler-cache: true
2806
+ - name: Install gem extension
2807
+ run: "./support/bundler_wrapper exec rake extension:install"
2808
+ - name: Print extension install report
2809
+ run: "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report
2810
+ file found'"
2811
+ - name: Print Makefile log file
2812
+ run: "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file
2813
+ found'"
2814
+ - name: Run tests
2815
+ run: "./support/bundler_wrapper exec rake test"
2816
+ env:
2817
+ RAILS_ENV: test
2818
+ JRUBY_OPTS: ''
2819
+ COV: '1'
2820
+ BUNDLE_GEMFILE: gemfiles/que-1.gemfile
2821
+ ruby_2-7-8__que-2_ubuntu-latest:
2822
+ name: Ruby 2.7.8 - que-2
2688
2823
  needs: ruby_2-7-8_ubuntu-latest
2689
2824
  runs-on: ubuntu-latest
2690
2825
  steps:
@@ -2709,7 +2844,7 @@ jobs:
2709
2844
  RAILS_ENV: test
2710
2845
  JRUBY_OPTS: ''
2711
2846
  COV: '1'
2712
- BUNDLE_GEMFILE: gemfiles/que.gemfile
2847
+ BUNDLE_GEMFILE: gemfiles/que-2.gemfile
2713
2848
  ruby_2-7-8__rails-6-0_ubuntu-latest:
2714
2849
  name: Ruby 2.7.8 - rails-6.0
2715
2850
  needs: ruby_2-7-8_ubuntu-latest
data/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 4.0.6
4
+
5
+ _Published on 2024-09-03._
6
+
7
+ ### Added
8
+
9
+ - Add support for Que 2 keyword arguments. Que job arguments will now be reported as the `arguments` key for positional arguments and `keyword_arguments` for Ruby keyword arguments. (patch [770bdc06](https://github.com/appsignal/appsignal-ruby/commit/770bdc06c352de09757edc92ee06b7c999befaee))
10
+
11
+ ## 4.0.5
12
+
13
+ _Published on 2024-09-02._
14
+
15
+ ### Added
16
+
17
+ - Report Puma low-level errors using the `lowlevel_error` reporter. This will report errors previously not caught by our instrumentation middleware. (patch [70cc21f4](https://github.com/appsignal/appsignal-ruby/commit/70cc21f49e19faa9fd2d12a051620cd48e036dcb))
18
+
19
+ ### Changed
20
+
21
+ - Log a warning when loader defaults are added after AppSignal has already been configured.
22
+
23
+ ```ruby
24
+ # Bad
25
+ Appsignal.configure # or Appsignal.start
26
+ Appsignal.load(:sinatra)
27
+
28
+ # Good
29
+ Appsignal.load(:sinatra)
30
+ Appsignal.configure # or Appsignal.start
31
+ ```
32
+
33
+ (patch [0997dd9c](https://github.com/appsignal/appsignal-ruby/commit/0997dd9c0430123a697b8100785f5676163e20ef))
34
+ - Rename the `path` and `method` transaction metadata to `request_path` and `request_method` to make it more clear what context this metadata is from. The `path` and `method` metadata will continue to be reported until the next major/minor version. (patch [fa314b5f](https://github.com/appsignal/appsignal-ruby/commit/fa314b5fb6fdfbf3e9746df377b0145cde0cfa36))
35
+ - Internal change to how OpenTelemetry metrics are sent. (patch [e66d1d70](https://github.com/appsignal/appsignal-ruby/commit/e66d1d702d5010cb5b8084ba790b24d9e70a9e08))
36
+
37
+ ### Removed
38
+
39
+ - Drop support for Puma version 2 and lower. (patch [4fab861c](https://github.com/appsignal/appsignal-ruby/commit/4fab861cae74b08aa71bf64e1b134ae4b1df1dff))
40
+
41
+ ### Fixed
42
+
43
+ - Fix the error log message about our `at_exit` hook reporting no error on process exit when the process exits without an error. (patch [b71f3966](https://github.com/appsignal/appsignal-ruby/commit/b71f39661e9b05c10fa78b821ba0e45bde0c941b))
44
+
3
45
  ## 4.0.4
4
46
 
5
47
  _Published on 2024-08-29._
data/build_matrix.yml CHANGED
@@ -138,7 +138,8 @@ matrix:
138
138
  - "3.1.6"
139
139
  - "3.0.7"
140
140
  - "2.7.8"
141
- - gem: "que"
141
+ - gem: "que-1"
142
+ - gem: "que-2"
142
143
  - gem: "rails-6.0"
143
144
  only:
144
145
  ruby:
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" => "0.35.21",
9
+ "version" => "0.35.23",
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" => "0e7b5bc5bf1e9903276b9fbe105af1128011613f9dc7ac7cedd4d230d92011bd",
17
+ "checksum" => "efb58de4d4095dc9d810db5daf09eff87dc66b3c8566dffe949302841155a836",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "56cc9aed70014b4fda2b30ff34819370cab2eb2bda588f59d7d86816d60a458f",
21
+ "checksum" => "f8aab2ad0ae30afb0a501a8787c8a729d5dd77434823e9e9fd8fd9b2d392efcd",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "0e7b5bc5bf1e9903276b9fbe105af1128011613f9dc7ac7cedd4d230d92011bd",
27
+ "checksum" => "efb58de4d4095dc9d810db5daf09eff87dc66b3c8566dffe949302841155a836",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "56cc9aed70014b4fda2b30ff34819370cab2eb2bda588f59d7d86816d60a458f",
31
+ "checksum" => "f8aab2ad0ae30afb0a501a8787c8a729d5dd77434823e9e9fd8fd9b2d392efcd",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "423178f0178f15d7f663451e45a318ca92d8f7cca136b5e985e753520b4ad3e4",
37
+ "checksum" => "dde837d344805abcd6f55f2931f2398ab11e35f99333e2347deb2a1aa1ea20e8",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "c2c0aeba5ddb38584c8b1cc8b2ad2407431c71b944cd4dee47d45828b93619ae",
41
+ "checksum" => "6a2f421a5354b51d0b7eb5fb6e44633f2f89427c964d3d274bd08eed76dd9135",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "423178f0178f15d7f663451e45a318ca92d8f7cca136b5e985e753520b4ad3e4",
47
+ "checksum" => "dde837d344805abcd6f55f2931f2398ab11e35f99333e2347deb2a1aa1ea20e8",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "c2c0aeba5ddb38584c8b1cc8b2ad2407431c71b944cd4dee47d45828b93619ae",
51
+ "checksum" => "6a2f421a5354b51d0b7eb5fb6e44633f2f89427c964d3d274bd08eed76dd9135",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "423178f0178f15d7f663451e45a318ca92d8f7cca136b5e985e753520b4ad3e4",
57
+ "checksum" => "dde837d344805abcd6f55f2931f2398ab11e35f99333e2347deb2a1aa1ea20e8",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "c2c0aeba5ddb38584c8b1cc8b2ad2407431c71b944cd4dee47d45828b93619ae",
61
+ "checksum" => "6a2f421a5354b51d0b7eb5fb6e44633f2f89427c964d3d274bd08eed76dd9135",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "bf94592c9640f89d0321acd5a0a9bd6951154c37f97f4778ddc2fc536203dc4f",
67
+ "checksum" => "ba5d59ac45992df8f677cee5a23ba9120f0553f331195872187dfcb2133136e6",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "8f8e60daae9ac10bae66fcf9ea33984046b5c92d911eae71ac1a8bdbaa7fa3eb",
71
+ "checksum" => "4b25da519413dc268bada4e5c0d7c94e13cc8e687a1ca6a7cf8810fd847bfc37",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "1553674c377a3e6fa56e31754d2af175e734531a44a76c680ff14cc49d4f0031",
77
+ "checksum" => "c23213ffb9cc8a045d5da6d7acb499055bc40f93c9ef147827f8d78c75cc7ddd",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "93e53b3cb2e2fb89cc3dff690da910fccb46503c3d58e4d3fb1a525fb222eea7",
81
+ "checksum" => "5c673340597d87aeba0d27f6517f357020b4c0ee28791aaebf297e56e8ed28a1",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "1553674c377a3e6fa56e31754d2af175e734531a44a76c680ff14cc49d4f0031",
87
+ "checksum" => "c23213ffb9cc8a045d5da6d7acb499055bc40f93c9ef147827f8d78c75cc7ddd",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "93e53b3cb2e2fb89cc3dff690da910fccb46503c3d58e4d3fb1a525fb222eea7",
91
+ "checksum" => "5c673340597d87aeba0d27f6517f357020b4c0ee28791aaebf297e56e8ed28a1",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "497d280dff46f7e72875af69f7b3756f3925bcad9e1922f030f818c8c5fa5d67",
97
+ "checksum" => "7b7eb13b5913a17cd0abadf646b2fc5485a74721712cad1c8db222c510fc2cae",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "1b230cc3e80ef4013defc9d6e80713d1d318ed7f673121433d864b47e239ff73",
101
+ "checksum" => "fb27e4dfd6ecce87ad44fa249c809c58b082f3a0c544965f25f6f3af3bb2c634",
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" => "2bcbc6b57a0298a97e6549e025ec092f8b3bd2b4e8f430fe7b040f7a2e274527",
107
+ "checksum" => "ae6bcf709d5263fe0267b8025c7264eb997dd913c7c24a12cbdaee1635df66de",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "7e89c78e9375d55b035f0e75e13d8dd278c2ddf4618fbe005c26f13d249b303f",
111
+ "checksum" => "929b7436354040d73666b7edbff5e3623cd10f99467c133def4a50bde9a81de4",
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" => "f9bfd06e0107f3a491ff6009a1e8c0d6d2598c128e8ee84bd852a2f8d3e8e16b",
117
+ "checksum" => "32ce5593cda7238819140d9fbc601519f5c16da075f2c0f7b639fe5f947ab98f",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "187a9a8e58617a0f78077b412dee18351cc975af41500443d7450fc44f2f65d3",
121
+ "checksum" => "dacd3037777ef00d838fe8d8f31247a96d6abe4bd5a0fb2c7b2e9e7b58864345",
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" => "cf8043c78e0e628cf0747dd57327d6c0ffd4147d3bff7b2426110fd2fada0960",
127
+ "checksum" => "558a6803b4bb2ceba261a0b6c0a2beb67493a41b9539fb9219b7e6fb8f0ffe36",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "072c2312aadf961c3f851552ee255db77f0c4050e47d438dd9f82e536b68bcd6",
131
+ "checksum" => "42e76a7b3ebb9e4a8c1e14c1435358ef09f02d59313148eaf9ebd33c10bdde33",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "cf8043c78e0e628cf0747dd57327d6c0ffd4147d3bff7b2426110fd2fada0960",
137
+ "checksum" => "558a6803b4bb2ceba261a0b6c0a2beb67493a41b9539fb9219b7e6fb8f0ffe36",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "072c2312aadf961c3f851552ee255db77f0c4050e47d438dd9f82e536b68bcd6",
141
+ "checksum" => "42e76a7b3ebb9e4a8c1e14c1435358ef09f02d59313148eaf9ebd33c10bdde33",
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 "que", "~> 1.0"
4
+
5
+ gemspec :path => "../"
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "que", "~> 2.0"
4
+
5
+ gemspec :path => "../"
@@ -98,16 +98,15 @@ module Appsignal
98
98
  response = CheckIn.transmitter.transmit(events, :format => :ndjson)
99
99
 
100
100
  if (200...300).include?(response.code.to_i)
101
- Appsignal.internal_logger.debug(
102
- "Transmitted #{description}"
103
- )
101
+ Appsignal.internal_logger.debug("Transmitted #{description}")
104
102
  else
105
103
  Appsignal.internal_logger.error(
106
104
  "Failed to transmit #{description}: #{response.code} status code"
107
105
  )
108
106
  end
109
107
  rescue => e
110
- Appsignal.internal_logger.error("Failed to transmit #{description}: #{e.message}")
108
+ Appsignal.internal_logger
109
+ .error("Failed to transmit #{description}: #{e.class}: #{e.message}")
111
110
  end
112
111
  end
113
112
 
@@ -15,6 +15,13 @@ module Appsignal
15
15
 
16
16
  # @api private
17
17
  def self.add_loader_defaults(name, env: nil, root_path: nil, **options)
18
+ if Appsignal.config
19
+ Appsignal.internal_logger.warn(
20
+ "The config defaults from the '#{name}' loader are ignored since " \
21
+ "the AppSignal config has already been initialized."
22
+ )
23
+ end
24
+
18
25
  loader_defaults << {
19
26
  :name => name,
20
27
  :env => env,
@@ -24,6 +24,7 @@ module Appsignal
24
24
  class AtExitCallback
25
25
  def self.call
26
26
  error = $! # rubocop:disable Style/SpecialGlobalVars
27
+ return unless error
27
28
  return if ignored_error?(error)
28
29
  return if Appsignal::Transaction.last_errors.include?(error)
29
30
 
@@ -7,10 +7,14 @@ module Appsignal
7
7
  register :puma
8
8
 
9
9
  def dependencies_present?
10
- defined?(::Puma)
10
+ defined?(::Puma) &&
11
+ Gem::Version.new(Puma::Const::VERSION) >= Gem::Version.new("3.0.0")
11
12
  end
12
13
 
13
14
  def install
15
+ require "appsignal/integrations/puma"
16
+ ::Puma::Server.prepend(Appsignal::Integrations::PumaServer)
17
+
14
18
  return unless defined?(::Puma::Cluster)
15
19
 
16
20
  # For clustered mode with multiple workers
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appsignal
4
+ module Integrations
5
+ # @api private
6
+ module PumaServer
7
+ def lowlevel_error(error, env, response_status = 500)
8
+ response =
9
+ if method(:lowlevel_error).super_method.arity.abs == 3 # Puma >= 5
10
+ super
11
+ else # Puma <= 4
12
+ super(error, env)
13
+ end
14
+
15
+ unless PumaServerHelper.ignored_error?(error)
16
+ Appsignal.report_error(error) do |transaction|
17
+ Appsignal::Rack::ApplyRackRequest
18
+ .new(::Rack::Request.new(env))
19
+ .apply_to(transaction)
20
+ transaction.add_tags(
21
+ :reported_by => :puma_lowlevel_error,
22
+ :response_status => response_status
23
+ )
24
+ end
25
+ end
26
+
27
+ response
28
+ end
29
+ end
30
+
31
+ module PumaServerHelper
32
+ IGNORED_ERRORS = [
33
+ # Ignore internal Puma Client IO errors
34
+ # https://github.com/puma/puma/blob/9ee922d28e1fffd02c1d5480a9e13376f92f46a3/lib/puma/server.rb#L536-L544
35
+ "Puma::MiniSSL::SSLError",
36
+ "Puma::HttpParserError",
37
+ "Puma::HttpParserError501"
38
+ ].freeze
39
+
40
+ def self.ignored_error?(error)
41
+ IGNORED_ERRORS.include?(error.class.to_s)
42
+ end
43
+ end
44
+ end
45
+ end
@@ -4,7 +4,7 @@ module Appsignal
4
4
  module Integrations
5
5
  # @api private
6
6
  module QuePlugin
7
- def _run(*)
7
+ def _run(*args)
8
8
  transaction =
9
9
  Appsignal::Transaction.create(Appsignal::Transaction::BACKGROUND_JOB)
10
10
 
@@ -16,7 +16,13 @@ module Appsignal
16
16
  ensure
17
17
  local_attrs = respond_to?(:que_attrs) ? que_attrs : attrs
18
18
  transaction.set_action_if_nil("#{local_attrs[:job_class]}#run")
19
- transaction.add_params_if_nil(local_attrs[:args])
19
+ transaction.add_params_if_nil do
20
+ {
21
+ :arguments => local_attrs[:args]
22
+ }.tap do |hash|
23
+ hash[:keyword_arguments] = local_attrs[:kwargs] if local_attrs.key?(:kwargs)
24
+ end
25
+ end
20
26
  transaction.add_tags(
21
27
  "id" => local_attrs[:job_id] || local_attrs[:id],
22
28
  "queue" => local_attrs[:queue],