appsignal 3.4.11-java → 3.4.13-java

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: 2734459fc06f6ae3af052dc8cb418e10d81ad0ce5b6c73d74ff2e354984a069f
4
- data.tar.gz: 1870d2a660dd057868f81d931a27bd047c781bb386ddc938cb3f5e48a41d989c
3
+ metadata.gz: b41d6efe818b166be8e991092a0587f4f0b594c99145564c3e5b88525a322c55
4
+ data.tar.gz: 712225f476fd4e66c83bc2b59f605eca653228fa75551f34c8210206bb87aea9
5
5
  SHA512:
6
- metadata.gz: e931cd117c741e0477517317381adfd6957e762e4e29e596727d1017417a5c34df803eb83a707f6121b60154c4ad5ddff698079c46640035b8077da19c85c062
7
- data.tar.gz: 13e146b750712f1e3e1cb08bf6765ecf88762f278a3e0d21067aaae390d2deadaf0dbc76a08c0812a1996d83fa18d99977e1fc96f50d0335aa6890a1a3bcf52b
6
+ metadata.gz: 2be011ff3b369f45fbfb696dde0a8b87f9a8ae2e493bdaf64f4bec1d9b5cc7f3a84de21c5c70f206cab9d2534d4aff050d764f9c84285dd0b8e61d59474772dd
7
+ data.tar.gz: 8980095a2da7d7f044e68fa02600a73ad48c584e1a450e2dca4be2e7fc4cc2579a7bb5a627d9ee691e0bac1f7065f9d100f705437df99c0875bcb34182da8eaf
@@ -583,6 +583,24 @@ blocks:
583
583
  value: latest
584
584
  commands:
585
585
  - "./support/bundler_wrapper exec rake test"
586
+ - name: Ruby 3.0.5 for dry-monitor
587
+ env_vars:
588
+ - *2
589
+ - *3
590
+ - *4
591
+ - *5
592
+ - name: RUBY_VERSION
593
+ value: 3.0.5
594
+ - name: GEMSET
595
+ value: dry-monitor
596
+ - name: BUNDLE_GEMFILE
597
+ value: gemfiles/dry-monitor.gemfile
598
+ - name: _RUBYGEMS_VERSION
599
+ value: latest
600
+ - name: _BUNDLER_VERSION
601
+ value: latest
602
+ commands:
603
+ - "./support/bundler_wrapper exec rake test"
586
604
  - name: Ruby 3.0.5 for grape
587
605
  env_vars:
588
606
  - *2
@@ -781,6 +799,24 @@ blocks:
781
799
  value: latest
782
800
  commands:
783
801
  - "./support/bundler_wrapper exec rake test"
802
+ - name: Ruby 3.0.5 for rails-7.1
803
+ env_vars:
804
+ - *2
805
+ - *3
806
+ - *4
807
+ - *5
808
+ - name: RUBY_VERSION
809
+ value: 3.0.5
810
+ - name: GEMSET
811
+ value: rails-7.1
812
+ - name: BUNDLE_GEMFILE
813
+ value: gemfiles/rails-7.1.gemfile
814
+ - name: _RUBYGEMS_VERSION
815
+ value: latest
816
+ - name: _BUNDLER_VERSION
817
+ value: latest
818
+ commands:
819
+ - "./support/bundler_wrapper exec rake test"
784
820
  - name: Ruby 3.0.5 for sequel
785
821
  env_vars:
786
822
  - *2
@@ -940,6 +976,24 @@ blocks:
940
976
  value: latest
941
977
  commands:
942
978
  - "./support/bundler_wrapper exec rake test"
979
+ - name: Ruby 3.1.3 for dry-monitor
980
+ env_vars:
981
+ - *2
982
+ - *3
983
+ - *4
984
+ - *5
985
+ - name: RUBY_VERSION
986
+ value: 3.1.3
987
+ - name: GEMSET
988
+ value: dry-monitor
989
+ - name: BUNDLE_GEMFILE
990
+ value: gemfiles/dry-monitor.gemfile
991
+ - name: _RUBYGEMS_VERSION
992
+ value: latest
993
+ - name: _BUNDLER_VERSION
994
+ value: latest
995
+ commands:
996
+ - "./support/bundler_wrapper exec rake test"
943
997
  - name: Ruby 3.1.3 for grape
944
998
  env_vars:
945
999
  - *2
@@ -1120,6 +1174,24 @@ blocks:
1120
1174
  value: latest
1121
1175
  commands:
1122
1176
  - "./support/bundler_wrapper exec rake test"
1177
+ - name: Ruby 3.1.3 for rails-7.1
1178
+ env_vars:
1179
+ - *2
1180
+ - *3
1181
+ - *4
1182
+ - *5
1183
+ - name: RUBY_VERSION
1184
+ value: 3.1.3
1185
+ - name: GEMSET
1186
+ value: rails-7.1
1187
+ - name: BUNDLE_GEMFILE
1188
+ value: gemfiles/rails-7.1.gemfile
1189
+ - name: _RUBYGEMS_VERSION
1190
+ value: latest
1191
+ - name: _BUNDLER_VERSION
1192
+ value: latest
1193
+ commands:
1194
+ - "./support/bundler_wrapper exec rake test"
1123
1195
  - name: Ruby 3.1.3 for sequel
1124
1196
  env_vars:
1125
1197
  - *2
@@ -1279,6 +1351,24 @@ blocks:
1279
1351
  value: latest
1280
1352
  commands:
1281
1353
  - "./support/bundler_wrapper exec rake test"
1354
+ - name: Ruby 3.2.1 for dry-monitor
1355
+ env_vars:
1356
+ - *2
1357
+ - *3
1358
+ - *4
1359
+ - *5
1360
+ - name: RUBY_VERSION
1361
+ value: 3.2.1
1362
+ - name: GEMSET
1363
+ value: dry-monitor
1364
+ - name: BUNDLE_GEMFILE
1365
+ value: gemfiles/dry-monitor.gemfile
1366
+ - name: _RUBYGEMS_VERSION
1367
+ value: latest
1368
+ - name: _BUNDLER_VERSION
1369
+ value: latest
1370
+ commands:
1371
+ - "./support/bundler_wrapper exec rake test"
1282
1372
  - name: Ruby 3.2.1 for grape
1283
1373
  env_vars:
1284
1374
  - *2
@@ -1459,6 +1549,24 @@ blocks:
1459
1549
  value: latest
1460
1550
  commands:
1461
1551
  - "./support/bundler_wrapper exec rake test"
1552
+ - name: Ruby 3.2.1 for rails-7.1
1553
+ env_vars:
1554
+ - *2
1555
+ - *3
1556
+ - *4
1557
+ - *5
1558
+ - name: RUBY_VERSION
1559
+ value: 3.2.1
1560
+ - name: GEMSET
1561
+ value: rails-7.1
1562
+ - name: BUNDLE_GEMFILE
1563
+ value: gemfiles/rails-7.1.gemfile
1564
+ - name: _RUBYGEMS_VERSION
1565
+ value: latest
1566
+ - name: _BUNDLER_VERSION
1567
+ value: latest
1568
+ commands:
1569
+ - "./support/bundler_wrapper exec rake test"
1462
1570
  - name: Ruby 3.2.1 for sequel
1463
1571
  env_vars:
1464
1572
  - *2
@@ -1636,3 +1744,21 @@ blocks:
1636
1744
  value: latest
1637
1745
  commands:
1638
1746
  - "./support/bundler_wrapper exec rake test"
1747
+ - name: Ruby jruby-9.4.1.0 for rails-7.1
1748
+ env_vars:
1749
+ - *2
1750
+ - *3
1751
+ - *4
1752
+ - *5
1753
+ - name: RUBY_VERSION
1754
+ value: jruby-9.4.1.0
1755
+ - name: GEMSET
1756
+ value: rails-7.1
1757
+ - name: BUNDLE_GEMFILE
1758
+ value: gemfiles/rails-7.1.gemfile
1759
+ - name: _RUBYGEMS_VERSION
1760
+ value: latest
1761
+ - name: _BUNDLER_VERSION
1762
+ value: latest
1763
+ commands:
1764
+ - "./support/bundler_wrapper exec rake test"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.4.13
4
+
5
+ ### Added
6
+
7
+ - [29970d93](https://github.com/appsignal/appsignal-ruby/commit/29970d93a63aa174fbc4a41b29eff996ef0ede5e) patch - Events from `dry-monitor` are now supported. There's also native support for `rom-sql` instrumentation events if they're configured.
8
+ - [27656744](https://github.com/appsignal/appsignal-ruby/commit/27656744d5d5657d120b4fcd97857c17421d8dfd) patch - Support Rails 7.1 ActiveSupport Notifications handler.
9
+
10
+ ### Changed
11
+
12
+ - [6932bb3f](https://github.com/appsignal/appsignal-ruby/commit/6932bb3f7eae75beeb86e29ddc16dc16f9da4428) patch - Add configuration load modifiers to diagnose report. Track if the `APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR` environment variable was set.
13
+
14
+ ## 3.4.12
15
+
16
+ ### Added
17
+
18
+ - [441de353](https://github.com/appsignal/appsignal-ruby/commit/441de3537e7a8f36dd2460149c171aaa80929e53) patch - Add an option to not start AppSignal on config file errors. When the `config/appsignal.yml` file raises an error (due to ERB syntax issues or ERB errors), it will currently ignore the config file and try to make a configuration work from the other config sources (default, auto detection and system environment variables). This can cause unexpected behavior, because the config from the config file is not part of the loaded config.
19
+
20
+ In future versions of the Ruby gem, AppSignal will not start when the config file contains an error. To opt-in to this new behavior, set the `APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR` system environment variable to either `1` or `true`.
21
+
22
+ ### Changed
23
+
24
+ - [a42da92b](https://github.com/appsignal/appsignal-ruby/commit/a42da92b1ff16c48eb40dc081d3b4fbd6480c7c0) patch - Log an error when sample data is of an invalid type. Accepted types are Array and Hash. If any other types are given, it will log an error to the `appsignal.log` file.
25
+
26
+ ### Fixed
27
+
28
+ - [8e636323](https://github.com/appsignal/appsignal-ruby/commit/8e6363232dc7fabe5f1aeae5758802e4c8d6cbfa) patch - Bump agent to 6133900.
29
+
30
+ - Fix `disk_inode_usage` metric name format to not be interpreted as a JSON object.
31
+
3
32
  ## 3.4.11
4
33
 
5
34
  ### Added
data/README.md CHANGED
@@ -231,6 +231,7 @@ configurations you need to run the spec suite with a specific Gemfile.
231
231
  ```
232
232
  BUNDLE_GEMFILE=gemfiles/capistrano2.gemfile bundle exec rspec
233
233
  BUNDLE_GEMFILE=gemfiles/capistrano3.gemfile bundle exec rspec
234
+ BUNDLE_GEMFILE=gemfiles/dry-monitor.gemfile bundle exec rspec
234
235
  BUNDLE_GEMFILE=gemfiles/grape.gemfile bundle exec rspec
235
236
  BUNDLE_GEMFILE=gemfiles/hanami.gemfile bundle exec rspec
236
237
  BUNDLE_GEMFILE=gemfiles/http5.gemfile bundle exec rspec
data/build_matrix.yml CHANGED
@@ -170,6 +170,7 @@ matrix:
170
170
  - "rails-6.0"
171
171
  - "rails-6.1"
172
172
  - "rails-7.0"
173
+ - "rails-7.1"
173
174
 
174
175
  ruby:
175
176
  - ruby: "2.7.8"
@@ -182,6 +183,12 @@ matrix:
182
183
  - gem: "no_dependencies"
183
184
  - gem: "capistrano2"
184
185
  - gem: "capistrano3"
186
+ - gem: "dry-monitor"
187
+ only:
188
+ ruby:
189
+ - "3.0.5"
190
+ - "3.1.3"
191
+ - "3.2.1"
185
192
  - gem: "grape"
186
193
  - gem: "hanami"
187
194
  only:
@@ -229,6 +236,13 @@ matrix:
229
236
  - "3.1.3"
230
237
  - "3.2.1"
231
238
  - "jruby-9.4.1.0"
239
+ - gem: "rails-7.1"
240
+ only:
241
+ ruby:
242
+ - "3.0.5"
243
+ - "3.1.3"
244
+ - "3.2.1"
245
+ - "jruby-9.4.1.0"
232
246
  - gem: "sequel"
233
247
  - gem: "sinatra"
234
248
  - gem: "webmachine1"
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" => "d789895",
9
+ "version" => "6133900",
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" => "8ea76b7d011c728b7988d017a39fc3a432d9c86392e6e46767ecc931e583777a",
17
+ "checksum" => "19cfea536fc6c4a8fe335a26d14ce955b422c23217902642f95d7df670152238",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "beacdcd579bcc06a69da279dbca2f363395ea4b1846fa4b6e49de612beb07a8a",
21
+ "checksum" => "f5c4b66b45faac47473befdbe286a037d8fca9386339b00f59be9e9505d15b13",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "8ea76b7d011c728b7988d017a39fc3a432d9c86392e6e46767ecc931e583777a",
27
+ "checksum" => "19cfea536fc6c4a8fe335a26d14ce955b422c23217902642f95d7df670152238",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "beacdcd579bcc06a69da279dbca2f363395ea4b1846fa4b6e49de612beb07a8a",
31
+ "checksum" => "f5c4b66b45faac47473befdbe286a037d8fca9386339b00f59be9e9505d15b13",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "535fed60ac1484e40bbfe77cd4fe9131c67f25e6362a2fe31d987c36ec82ba08",
37
+ "checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "6c984f53a07788ebb469ede014ac8732d9db1ef43736825690492e7c12e3fb83",
41
+ "checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "535fed60ac1484e40bbfe77cd4fe9131c67f25e6362a2fe31d987c36ec82ba08",
47
+ "checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "6c984f53a07788ebb469ede014ac8732d9db1ef43736825690492e7c12e3fb83",
51
+ "checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "535fed60ac1484e40bbfe77cd4fe9131c67f25e6362a2fe31d987c36ec82ba08",
57
+ "checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "6c984f53a07788ebb469ede014ac8732d9db1ef43736825690492e7c12e3fb83",
61
+ "checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "35f96e0adf408fd8ac3e89c6cb3c5506eb4250643199aad3ba298ab131d773c8",
67
+ "checksum" => "cdd75637940fcfd369b569e873048c7d37a3844d9d31d783e4459b375b78ee0e",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "6f4e5431c50c947f9fdeb92b7536780277bebb75327cfa5ee9c27659a9d20b5e",
71
+ "checksum" => "99b52c29d497d63f02a4ff7162152641b51e7ecd292d07f0330e7d4f3abc8075",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "f4a1c9a67a0a4cde7e13ef555a6782e5d4f15bfbce9277c2aaf8e248a0fb858e",
77
+ "checksum" => "a9374d1fd4baae84f1c4a74957cbb8c919b29ae2ab05a571ff75b9ca483717ab",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "26a3fa059874d76897e6a4c709048789f531d7e84e6b8ae4e7fbcdfb26cdef40",
81
+ "checksum" => "d643c72add6fe1054faff034101cf5a2676a169c7bff479f3d79e71875598b8a",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "f4a1c9a67a0a4cde7e13ef555a6782e5d4f15bfbce9277c2aaf8e248a0fb858e",
87
+ "checksum" => "a9374d1fd4baae84f1c4a74957cbb8c919b29ae2ab05a571ff75b9ca483717ab",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "26a3fa059874d76897e6a4c709048789f531d7e84e6b8ae4e7fbcdfb26cdef40",
91
+ "checksum" => "d643c72add6fe1054faff034101cf5a2676a169c7bff479f3d79e71875598b8a",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "016c962727e31a07eee7a221944ff9c4bbb054eada7e87bbe4602233364f380c",
97
+ "checksum" => "bd625ed84100d0632b298ac602b152463628c41afe56a8621745cdae626f8413",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "d286a8bcc4a876057a14a90cc6ceecdc75230e1c4d721ea3f3138c58c748e602",
101
+ "checksum" => "0daa644acfee46848282ad733b175e4994e7faf64c8bc046d2efff2b8fc1afdd",
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" => "2ce9e34b283c76c6b25028d3a770a942f4975cd071c586438a8765948237ca42",
107
+ "checksum" => "7988c4a2a6ba5d59be2186ce9bf51ab50b6537a60888b08c8e9066172516e59d",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "0eebe8cd448bce5386cdce1039e7f74c60208408108af9537a80e8e8737f7aec",
111
+ "checksum" => "93e47c9400ddae42a8cd2b80c09c9134ee96a76bf622c3ad5d53b776fec1a3f0",
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" => "017da79e62a2875c0384898c9160cd83acd712faba05154fd8a0627fec1b5ba4",
117
+ "checksum" => "8e5fe2a8bc4cb7de4ba7d61fec48f15aa0cd580050f67752f07625853636eb16",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "507d4fa0f3d6168f905404b4b36fe494c5479606d77f50d2d2d3d27b6c645ea1",
121
+ "checksum" => "01f993b3320f0377ef9f652bb215ce268da208f46a6f59ad0c0e71f57257b4ef",
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" => "13d27afcb68aff5e164e05fc4fd8874e73f14c0154301f2e6e6e75f67fa9182c",
127
+ "checksum" => "09e21821eb98ad6afdb5d3708b67ea25799aedbee2ccb0d566b99d9c5703cb1e",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "dafa25a73cd79e269466d5129dd7b61ac88e09d87c3f253fc9705e1d9469fa2b",
131
+ "checksum" => "e77592de9dd7ff41efb6c1d2d88e06fa7b663e9ff009392bb971b1333e0f28d7",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "13d27afcb68aff5e164e05fc4fd8874e73f14c0154301f2e6e6e75f67fa9182c",
137
+ "checksum" => "09e21821eb98ad6afdb5d3708b67ea25799aedbee2ccb0d566b99d9c5703cb1e",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "dafa25a73cd79e269466d5129dd7b61ac88e09d87c3f253fc9705e1d9469fa2b",
141
+ "checksum" => "e77592de9dd7ff41efb6c1d2d88e06fa7b663e9ff009392bb971b1333e0f28d7",
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 "dry-monitor", "~> 1.0.1"
4
+
5
+ gemspec :path => '../'
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 7.1.0"
4
+ gem "rake", "> 12.2"
5
+ gem "sidekiq"
6
+
7
+ gemspec :path => "../"
@@ -477,6 +477,10 @@ module Appsignal
477
477
  :file => config.file_config,
478
478
  :env => config.env_config,
479
479
  :override => config.override_config
480
+ },
481
+ :modifiers => {
482
+ "APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR" =>
483
+ ENV.fetch("APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR", "")
480
484
  }
481
485
  }
482
486
  print_config_options(config)
@@ -519,6 +523,11 @@ module Appsignal
519
523
  end
520
524
  end
521
525
 
526
+ puts
527
+ puts "Configuration modifiers"
528
+ puts " APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR: " \
529
+ "#{data[:config][:modifiers]["APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR"].inspect}"
530
+
522
531
  puts "\nRead more about how the diagnose config output is rendered\n" \
523
532
  "https://docs.appsignal.com/ruby/command-line/diagnose.html"
524
533
  end
@@ -232,6 +232,7 @@ module Appsignal
232
232
  # How to integrate AppSignal manually
233
233
  def initialize(root_path, env, initial_config = {}, logger = Appsignal.logger,
234
234
  config_file = nil)
235
+ @config_file_error = false
235
236
  @root_path = root_path
236
237
  @config_file = config_file
237
238
  @logger = logger
@@ -417,8 +418,20 @@ module Appsignal
417
418
  nil
418
419
  end
419
420
  rescue => e
420
- message = "An error occured while loading the AppSignal config file." \
421
- " Skipping file config.\n" \
421
+ # TODO: Remove in the next major version
422
+ @config_file_error = true
423
+ extra_message =
424
+ if inactive_on_config_file_error?
425
+ "Not starting AppSignal because " \
426
+ "APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR is set."
427
+ else
428
+ "Skipping file config. In future versions AppSignal will not start " \
429
+ "on a config file error. To opt-in to this new behavior set " \
430
+ "'APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR=1' in your system " \
431
+ "environment."
432
+ end
433
+ message = "An error occured while loading the AppSignal config file. " \
434
+ "#{extra_message}\n" \
422
435
  "File: #{config_file.inspect}\n" \
423
436
  "#{e.class.name}: #{e}"
424
437
  Kernel.warn "appsignal: #{message}"
@@ -485,6 +498,12 @@ module Appsignal
485
498
  # stick around as a structure for future deprecations.
486
499
  def determine_overrides
487
500
  config = {}
501
+ # If an error was detected during config file reading/parsing and the new
502
+ # behavior is enabled to not start AppSignal on incomplete config, do not
503
+ # start AppSignal.
504
+ # TODO: Make default behavior in next major version. Remove
505
+ # `inactive_on_config_file_error?` call.
506
+ config[:active] = false if @config_file_error && inactive_on_config_file_error?
488
507
  skip_session_data = config_hash[:skip_session_data]
489
508
  send_session_data = config_hash[:send_session_data]
490
509
  if skip_session_data.nil? # Deprecated option is not set
@@ -508,5 +527,11 @@ module Appsignal
508
527
  config_hash[key] = value
509
528
  end
510
529
  end
530
+
531
+ # Does it use the new behavior?
532
+ def inactive_on_config_file_error?
533
+ value = ENV.fetch("APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR", false)
534
+ ["1", "true"].include?(value)
535
+ end
511
536
  end
512
537
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appsignal
4
+ class EventFormatter
5
+ module Rom
6
+ class SqlFormatter
7
+ def format(payload)
8
+ ["query.#{payload[:name]}", payload[:query], SQL_BODY_FORMAT]
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+
15
+ Appsignal::EventFormatter.register(
16
+ "sql.dry",
17
+ Appsignal::EventFormatter::Rom::SqlFormatter
18
+ )
@@ -22,21 +22,30 @@ module Appsignal
22
22
  end
23
23
 
24
24
  require "appsignal/integrations/active_support_notifications"
25
- instrumenter = ::ActiveSupport::Notifications::Instrumenter
26
25
  parent_integration_module = Appsignal::Integrations::ActiveSupportNotificationsIntegration
27
- if instrumenter.method_defined?(:start) && instrumenter.method_defined?(:finish)
28
- install_module(parent_integration_module::StartFinishIntegration)
26
+
27
+ if defined?(::ActiveSupport::Notifications::Fanout::Handle)
28
+ install_module(
29
+ parent_integration_module::StartFinishHandlerIntegration,
30
+ ::ActiveSupport::Notifications::Fanout::Handle
31
+ )
29
32
  else
30
- install_module(parent_integration_module::InstrumentIntegration)
31
- end
33
+ instrumenter = ::ActiveSupport::Notifications::Instrumenter
32
34
 
33
- return unless instrumenter.method_defined?(:finish_with_state)
35
+ if instrumenter.method_defined?(:start) && instrumenter.method_defined?(:finish)
36
+ install_module(parent_integration_module::StartFinishIntegration, instrumenter)
37
+ else
38
+ install_module(parent_integration_module::InstrumentIntegration, instrumenter)
39
+ end
34
40
 
35
- install_module(parent_integration_module::FinishStateIntegration)
41
+ return unless instrumenter.method_defined?(:finish_with_state)
42
+
43
+ install_module(parent_integration_module::FinishStateIntegration, instrumenter)
44
+ end
36
45
  end
37
46
 
38
- def install_module(mod)
39
- ::ActiveSupport::Notifications::Instrumenter.send(:prepend, mod)
47
+ def install_module(mod, instrumenter)
48
+ instrumenter.send(:prepend, mod)
40
49
  end
41
50
  end
42
51
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appsignal
4
+ class Hooks
5
+ # @api private
6
+ class DryMonitorHook < Appsignal::Hooks::Hook
7
+ register :dry_monitor
8
+
9
+ def dependencies_present?
10
+ defined?(::Dry::Monitor::Notifications)
11
+ end
12
+
13
+ def install
14
+ require "appsignal/integrations/dry_monitor"
15
+
16
+ ::Dry::Monitor::Notifications.prepend(Appsignal::Integrations::DryMonitorIntegration)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -95,6 +95,7 @@ require "appsignal/hooks/active_support_notifications"
95
95
  require "appsignal/hooks/celluloid"
96
96
  require "appsignal/hooks/delayed_job"
97
97
  require "appsignal/hooks/gvl"
98
+ require "appsignal/hooks/dry_monitor"
98
99
  require "appsignal/hooks/http"
99
100
  require "appsignal/hooks/mri"
100
101
  require "appsignal/hooks/net_http"
@@ -54,6 +54,32 @@ module Appsignal
54
54
  end
55
55
  end
56
56
 
57
+ module StartFinishHandlerIntegration
58
+ def start
59
+ instrument_this = @name[0] != ActiveSupportNotificationsIntegration::BANG
60
+
61
+ Appsignal::Transaction.current.start_event if instrument_this
62
+ super
63
+ end
64
+
65
+ def finish_with_values(name, id, payload = {})
66
+ # Events that start with a bang are internal to Rails
67
+ instrument_this = name[0] != ActiveSupportNotificationsIntegration::BANG
68
+
69
+ if instrument_this
70
+ title, body, body_format = Appsignal::EventFormatter.format(name, payload)
71
+ Appsignal::Transaction.current.finish_event(
72
+ name.to_s,
73
+ title,
74
+ body,
75
+ body_format
76
+ )
77
+ end
78
+
79
+ super
80
+ end
81
+ end
82
+
57
83
  module FinishStateIntegration
58
84
  def finish_with_state(listeners_state, name, payload = {})
59
85
  # Events that start with a bang are internal to Rails
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appsignal
4
+ module Integrations
5
+ module DryMonitorIntegration
6
+ def instrument(event_id, payload = {}, &block)
7
+ Appsignal::Transaction.current.start_event
8
+
9
+ super
10
+ ensure
11
+ title, body, body_format = Appsignal::EventFormatter.format("#{event_id}.dry", payload)
12
+
13
+ Appsignal::Transaction.current.finish_event(
14
+ title || event_id.to_s,
15
+ title,
16
+ body,
17
+ body_format
18
+ )
19
+ end
20
+ end
21
+ end
22
+ end