appsignal 4.2.0 → 4.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +443 -0
- data/README.md +0 -3
- data/Rakefile +1 -1
- data/appsignal.gemspec +2 -1
- data/build_matrix.yml +33 -0
- data/ext/agent.rb +27 -27
- data/ext/appsignal_extension.c +90 -73
- data/ext/base.rb +3 -1
- data/lib/appsignal/check_in/event.rb +55 -0
- data/lib/appsignal/check_in/scheduler.rb +8 -2
- data/lib/appsignal/check_in.rb +9 -8
- data/lib/appsignal/config.rb +36 -15
- data/lib/appsignal/custom_marker.rb +72 -0
- data/lib/appsignal/environment.rb +1 -0
- data/lib/appsignal/event_formatter/action_view/render_formatter.rb +4 -6
- data/lib/appsignal/event_formatter/view_component/render_formatter.rb +4 -6
- data/lib/appsignal/helpers/instrumentation.rb +5 -0
- data/lib/appsignal/hooks/active_job.rb +25 -5
- data/lib/appsignal/hooks/at_exit.rb +18 -4
- data/lib/appsignal/hooks/ownership.rb +44 -0
- data/lib/appsignal/hooks.rb +1 -0
- data/lib/appsignal/integrations/capistrano/appsignal.cap +4 -8
- data/lib/appsignal/integrations/capistrano/capistrano_2_tasks.rb +8 -11
- data/lib/appsignal/integrations/http.rb +2 -1
- data/lib/appsignal/integrations/ownership.rb +51 -0
- data/lib/appsignal/integrations/rake.rb +14 -2
- data/lib/appsignal/integrations/sidekiq.rb +14 -3
- data/lib/appsignal/internal_errors.rb +19 -0
- data/lib/appsignal/logger.rb +121 -69
- data/lib/appsignal/marker.rb +1 -1
- data/lib/appsignal/probes/sidekiq.rb +5 -1
- data/lib/appsignal/rack/body_wrapper.rb +1 -1
- data/lib/appsignal/rack/event_handler.rb +7 -5
- data/lib/appsignal/transaction.rb +91 -13
- data/lib/appsignal/version.rb +1 -1
- data/lib/appsignal.rb +82 -11
- data/resources/cacert.pem +164 -87
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b41543a5c8a4ab168f9e25cb08cb21cac1f2feab07e2ee94948cb3b5e4a93de
|
4
|
+
data.tar.gz: 27cd215ac772b9df1fd0851b0b7cbad6c201d273ddc9d416cf739b928c632c0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 972b6a1e047559e8b5821e6e3749e25b22226f1a3064afbbe1d75f72d5f91882bcb2eee7dab8f7098a58c4419e272e0cb91e8b5ce74f94468f7942b96400502d
|
7
|
+
data.tar.gz: 257ffe63d397bd648fefbf055fd5955851a6a95f605f810c5e2fc6cb0aef5bc5584b34487a4d0625dec08e73f1fd77ca15840a5d2fbd5d669f3c4c0f482817de
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,448 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 4.5.17
|
4
|
+
|
5
|
+
_Published on 2025-07-01._
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- When an `Appsignal::Logger` uses `.broadcast_to` to broadcast messages to other loggers, broadcast those messages even if the log level of those messages is lower than the logger's threshold. This allows other loggers to set their own logging thresholds.
|
10
|
+
|
11
|
+
When the logger is silenced, messages below the silencing threshold are *not* broadcasted to other loggers.
|
12
|
+
|
13
|
+
(patch [bd3f2147](https://github.com/appsignal/appsignal-ruby/commit/bd3f2147ec58f5ed8c6db49328429e30e1826800))
|
14
|
+
- When an `Appsignal::Logger` uses `.broadcast_to` to broadcast messages to other loggers, broadcast the original message received by the logger, without formatting it or converting it to a string. (patch [bd3f2147](https://github.com/appsignal/appsignal-ruby/commit/bd3f2147ec58f5ed8c6db49328429e30e1826800))
|
15
|
+
- Call the `Appsignal::Logger` formatter with the original message object given, rather than converting it to a string before calling the formatter. (patch [bd3f2147](https://github.com/appsignal/appsignal-ruby/commit/bd3f2147ec58f5ed8c6db49328429e30e1826800))
|
16
|
+
- When an error is passed to an `Appsignal::Logger` as the message, format it regardless of the logging level. Previously it would only be formatted when passed to `#error`. (patch [bd3f2147](https://github.com/appsignal/appsignal-ruby/commit/bd3f2147ec58f5ed8c6db49328429e30e1826800))
|
17
|
+
- Ignore `Errno::ECONNRESET` errors in the Rack wrapper. (patch [90b0b7a3](https://github.com/appsignal/appsignal-ruby/commit/90b0b7a3e14832cb3626adf4b339bee56ba9745e))
|
18
|
+
|
19
|
+
## 4.5.16
|
20
|
+
|
21
|
+
_Published on 2025-06-27._
|
22
|
+
|
23
|
+
### Changed
|
24
|
+
|
25
|
+
- Log the error's backtrace on extension download failure. This will help us debug issues related to downloading the extension. (patch [71b7b9fe](https://github.com/appsignal/appsignal-ruby/commit/71b7b9fe7e929857968b69afcaa957be2ac2150a))
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
|
29
|
+
- Fix non-canonical rendering event paths for Capistrano deployments (patch [84e3c5c5](https://github.com/appsignal/appsignal-ruby/commit/84e3c5c597589e9e4cd34f9dbf1062c337570275))
|
30
|
+
|
31
|
+
## 4.5.15
|
32
|
+
|
33
|
+
_Published on 2025-06-06._
|
34
|
+
|
35
|
+
### Added
|
36
|
+
|
37
|
+
- Add `nginx_port` configuration option. This configuration option can be used to customize the port on which the AppSignal integration exposes [the NGINX metrics server](https://docs.appsignal.com/metrics/nginx.html). (patch [16976de8](https://github.com/appsignal/appsignal-ruby/commit/16976de8ad3cedda2b6ba3986c325728f5629f50))
|
38
|
+
|
39
|
+
## 4.5.14
|
40
|
+
|
41
|
+
_Published on 2025-05-27._
|
42
|
+
|
43
|
+
### Fixed
|
44
|
+
|
45
|
+
- Resolve problems with transactions not being properly closed when using libraries that change Fibers during the transactions. Previously, completed transactions would be attempted to be reused when creating a transaction, when the Fiber would be switched during a transaction. (patch [32733b25](https://github.com/appsignal/appsignal-ruby/commit/32733b25ced393cc7ed4bd6f15f3b6b293b133c5))
|
46
|
+
- Fix a config error log message when the config is not active and should not validate the config. (patch [0d114b43](https://github.com/appsignal/appsignal-ruby/commit/0d114b435f63fe11bebce26efe282f90e2eb57aa))
|
47
|
+
|
48
|
+
## 4.5.13
|
49
|
+
|
50
|
+
_Published on 2025-05-12._
|
51
|
+
|
52
|
+
### Fixed
|
53
|
+
|
54
|
+
- Fix the C extension function definitions. On install, the Ruby gem extension would print warnings or fail to compile. (patch [c93f8e20](https://github.com/appsignal/appsignal-ruby/commit/c93f8e20860168929721f0c2b3e642a02dbde936))
|
55
|
+
|
56
|
+
## 4.5.12
|
57
|
+
|
58
|
+
_Published on 2025-05-12._
|
59
|
+
|
60
|
+
### Added
|
61
|
+
|
62
|
+
- Report the Active Job queue time as the `active_job_queue_time` metric. This metric can be used to track the queue time per Active Job queue. (patch [906f4458](https://github.com/appsignal/appsignal-ruby/commit/906f4458ceab3a922ffb1437e5bc85416589b809))
|
63
|
+
|
64
|
+
## 4.5.11
|
65
|
+
|
66
|
+
_Published on 2025-05-08._
|
67
|
+
|
68
|
+
### Changed
|
69
|
+
|
70
|
+
- Log a debug message when the reported error is ignored by the `ignore_errors` config option. (patch [0cda9da0](https://github.com/appsignal/appsignal-ruby/commit/0cda9da0c47c56bee39b6e045be36655dd13ee54))
|
71
|
+
|
72
|
+
## 4.5.10
|
73
|
+
|
74
|
+
_Published on 2025-05-05._
|
75
|
+
|
76
|
+
### Changed
|
77
|
+
|
78
|
+
- Remove redundant cron check-in pairs. When more than one pair of start and finish cron check-in events is reported for the same identifier in the same period, only one of them will be reported to AppSignal. (patch [803a0389](https://github.com/appsignal/appsignal-ruby/commit/803a03893aaf83391129b0b30cda169c8922a870))
|
79
|
+
|
80
|
+
## 4.5.9
|
81
|
+
|
82
|
+
_Published on 2025-04-09._
|
83
|
+
|
84
|
+
### Fixed
|
85
|
+
|
86
|
+
- Ensure request transactions are always closed in the `Rack::EventHandler`. A problem with Fibers changing during a request would cause transactions transactions to be left open and the data from requests to not be sent to our servers. (patch [52a72395](https://github.com/appsignal/appsignal-ruby/commit/52a72395b99a44d451fdc4026acfeb0cc2a5c23b))
|
87
|
+
|
88
|
+
## 4.5.8
|
89
|
+
|
90
|
+
_Published on 2025-04-04._
|
91
|
+
|
92
|
+
### Added
|
93
|
+
|
94
|
+
- Add the `enable_at_exit_hook` option to configure if `Appsignal.stop` is called when the Ruby application exits. Calling `Appsignal.stop` will stop the application for a moment to flush all the data to our agent before shutting down.
|
95
|
+
|
96
|
+
This option has three possible values:
|
97
|
+
|
98
|
+
- `always`: Always call `Appsignal.stop` when the program exits. On (Docker) containers it's automatically set to this value.
|
99
|
+
- `never`: Never call `Appsignal.stop` when the program exits. The default value when the program doesn't run on a (Docker) container.
|
100
|
+
- `on_error`: Call `Appsignal.stop` when the program exits with an error.
|
101
|
+
|
102
|
+
(patch [d0a5875c](https://github.com/appsignal/appsignal-ruby/commit/d0a5875cef5101680f1cab4649d71440212f9ea8), [043a6c74](https://github.com/appsignal/appsignal-ruby/commit/043a6c740b708e1182ed7161e3c9ad38bd3314de), [b680fe6f](https://github.com/appsignal/appsignal-ruby/commit/b680fe6f6b283205a13ca61bd4a26167f541dbca))
|
103
|
+
|
104
|
+
### Deprecated
|
105
|
+
|
106
|
+
- Deprecate the `Appsignal.monitor_and_stop` helper.
|
107
|
+
|
108
|
+
We instead recommend using the `Appsignal.monitor` helper and configuring the `enable_at_exit_hook` config option to `always`.
|
109
|
+
|
110
|
+
(patch [84969aea](https://github.com/appsignal/appsignal-ruby/commit/84969aeaca8f3737921e9adf1efdad55b52e1206))
|
111
|
+
|
112
|
+
## 4.5.7
|
113
|
+
|
114
|
+
_Published on 2025-03-20._
|
115
|
+
|
116
|
+
### Added
|
117
|
+
|
118
|
+
- Add the `Appsignal.config_error` and `Appsignal.config_error?` methods. This method contains any error that may have occurred while loading the `config/appsignal.rb` file. If it is `nil` no error occurred or `Appsignal.start` hasn't been called yet. The `Appsignal.config_error?` method is an alias for syntax sugar. (patch [0f3a7372](https://github.com/appsignal/appsignal-ruby/commit/0f3a73729306d96b630339ccf6e218318d1e2870))
|
119
|
+
- Add the `check_if_started!` method. This method will raise an error if the AppSignal Ruby gem failed to start.
|
120
|
+
|
121
|
+
Call this method in your CI or on app boot if you wish to verify that AppSignal has started when your application does, and want the application to fail to start if AppSignal hasn't started.
|
122
|
+
|
123
|
+
For example, in this Rails initializer:
|
124
|
+
|
125
|
+
```
|
126
|
+
# config/initializers/appsignal.rb
|
127
|
+
|
128
|
+
Appsignal.check_if_started!
|
129
|
+
```
|
130
|
+
|
131
|
+
(patch [b41c9c99](https://github.com/appsignal/appsignal-ruby/commit/b41c9c991bdbcd64b7a04e9832b15ddacda7ae20))
|
132
|
+
|
133
|
+
## 4.5.6
|
134
|
+
|
135
|
+
_Published on 2025-03-20._
|
136
|
+
|
137
|
+
### Added
|
138
|
+
|
139
|
+
- Add the Logger `<<` method. This improves our compatibility with Ruby's Logger class implementation, making it usable in more scenarios. (patch [e09a78a4](https://github.com/appsignal/appsignal-ruby/commit/e09a78a425607852b5e12adf5c9ddb718811b09f))
|
140
|
+
|
141
|
+
### Changed
|
142
|
+
|
143
|
+
- Explicitly return `nil` from public methods with no usable return value. We want to avoid the situation where `Appsignal.start` happens to return `true` and it is thought to mean that the gem started successfully.
|
144
|
+
|
145
|
+
Methods updated:
|
146
|
+
|
147
|
+
- `Appsignal.start`
|
148
|
+
- `Appsignal.stop`
|
149
|
+
- `Appsignal.configure`
|
150
|
+
- `Appsignal.forked`
|
151
|
+
- `Appsignal.load`
|
152
|
+
|
153
|
+
(patch [93c304ee](https://github.com/appsignal/appsignal-ruby/commit/93c304eecd80992648d9e836a52e28c4e78958ee))
|
154
|
+
- Differentiate between `process_request.rack` events. Add the callback that triggered the event in the event title for debugging purposes. (patch [4393b2fa](https://github.com/appsignal/appsignal-ruby/commit/4393b2faeac6d8be6390eef158b3cda133b99915))
|
155
|
+
- Improve the log message for the uneven timestack error. This will help the AppSignal team debug issues where events get closed when all events are already closed. (patch [d2d4863f](https://github.com/appsignal/appsignal-ruby/commit/d2d4863fc8421eabb4c88e945bb24243a56535d3))
|
156
|
+
|
157
|
+
## 4.5.5
|
158
|
+
|
159
|
+
_Published on 2025-03-14._
|
160
|
+
|
161
|
+
### Changed
|
162
|
+
|
163
|
+
- Improve SQL sanitisation for functions and numbered placeholders. (patch [316f1205](https://github.com/appsignal/appsignal-ruby/commit/316f12050bd4e1391a50ff72989aabbdb7a09760))
|
164
|
+
|
165
|
+
## 4.5.4
|
166
|
+
|
167
|
+
_Published on 2025-03-11._
|
168
|
+
|
169
|
+
### Changed
|
170
|
+
|
171
|
+
- Delay and eventually halt agent reboots by the extension.
|
172
|
+
|
173
|
+
The AppSignal extension is responsible for booting the AppSignal agent. If communication with the agent is lost, the extension is responsible for rebooting it.
|
174
|
+
|
175
|
+
In certain scenarios, such as when several processes with different AppSignal configurations are misconfigured to share the same working directory, the processes' extensions can enter a loop of rebooting and killing each others' agents. These short-lived agents may then attempt to repeatedly send pending payloads to AppSignal in quick succession.
|
176
|
+
|
177
|
+
This change causes the extension to delay each reboot of its agent by one additional second, and to no longer attempt to reboot the agent after the tenth reboot, slowing down and eventually breaking this loop.
|
178
|
+
|
179
|
+
(patch [8c66c704](https://github.com/appsignal/appsignal-ruby/commit/8c66c7049b038bae8c52a833b39993f9160c2ae8))
|
180
|
+
|
181
|
+
## 4.5.3
|
182
|
+
|
183
|
+
_Published on 2025-03-06._
|
184
|
+
|
185
|
+
### Changed
|
186
|
+
|
187
|
+
- Specify stricter Rack version requirement. The Ruby gem relies on the `Rack::Events` constant which was introduced in Rack 2. Update our version requirement to require Rack 2 or newer. (patch [19bdb0b3](https://github.com/appsignal/appsignal-ruby/commit/19bdb0b3914e93e9f7c7ffa3a1bad80d9f3d1520))
|
188
|
+
|
189
|
+
### Fixed
|
190
|
+
|
191
|
+
- Fix the queue time reporting for Sidekiq 8 jobs. It would report high negative values for the queue time with Sidekiq 8. (patch [6fcc40e3](https://github.com/appsignal/appsignal-ruby/commit/6fcc40e31e8656cb84daa8bb5a0bea7a137ab089))
|
192
|
+
|
193
|
+
## 4.5.2
|
194
|
+
|
195
|
+
_Published on 2025-02-24._
|
196
|
+
|
197
|
+
### Fixed
|
198
|
+
|
199
|
+
- Validate application environment sources so nil values and empty strings are not valid app environments.
|
200
|
+
Symbols are now always cast to a String before set as the application environment.
|
201
|
+
|
202
|
+
```ruby
|
203
|
+
# These will no longer be accepted as valid app environments
|
204
|
+
Appsignal.configure("")
|
205
|
+
Appsignal.configure(" ")
|
206
|
+
```
|
207
|
+
|
208
|
+
(patch [bfe37be9](https://github.com/appsignal/appsignal-ruby/commit/bfe37be9ca14248f5e5a030d0cab42998d371d36))
|
209
|
+
- Fix Capistrano version 2 and 3 support when using an `appsignal.rb` config file. It will now pick up the config from `appsignal.rb` file. (patch [2a694196](https://github.com/appsignal/appsignal-ruby/commit/2a6941967435d6672c122e0aa07ec9c2de3e30bc))
|
210
|
+
|
211
|
+
## 4.5.1
|
212
|
+
|
213
|
+
_Published on 2025-02-24._
|
214
|
+
|
215
|
+
### Changed
|
216
|
+
|
217
|
+
- [b3748870](https://github.com/appsignal/appsignal-ruby/commit/b3748870b0de1973566761308c365ce5c5de7d00) patch - Update bundled trusted root certificates
|
218
|
+
|
219
|
+
## 4.5.0
|
220
|
+
|
221
|
+
_Published on 2025-02-21._
|
222
|
+
|
223
|
+
### Added
|
224
|
+
|
225
|
+
- Add a helper to create custom markers from the Ruby gem.
|
226
|
+
|
227
|
+
Create a custom marker (a little icon shown in the graph timeline on AppSignal.com) to mark events on the timeline.
|
228
|
+
|
229
|
+
Create a marker with all the available options:
|
230
|
+
|
231
|
+
```ruby
|
232
|
+
Appsignal::CustomMarker.report(
|
233
|
+
# The icon shown on the timeline
|
234
|
+
:icon => "🎉",
|
235
|
+
# The message shown on hover
|
236
|
+
:message => "Migration completed",
|
237
|
+
# Any time object or a string with a ISO8601 valid time is accepted
|
238
|
+
:created_at => Time.now
|
239
|
+
)
|
240
|
+
```
|
241
|
+
|
242
|
+
Create a marker with just a message:
|
243
|
+
|
244
|
+
```ruby
|
245
|
+
Appsignal::CustomMarker.report(
|
246
|
+
:message => "Migration completed",
|
247
|
+
)
|
248
|
+
```
|
249
|
+
|
250
|
+
_The default icon is the 🚀 icon. The default time is the time the request is received by our servers._
|
251
|
+
|
252
|
+
(minor [e92c8c9d](https://github.com/appsignal/appsignal-ruby/commit/e92c8c9da6e0a159a4405ff178b346040db53fa4))
|
253
|
+
|
254
|
+
### Removed
|
255
|
+
|
256
|
+
- Remove the OpenTelemetry beta feature in favor of the new [AppSignal collector](https://docs.appsignal.com/collector). If you are using the AppSignal agent to send OpenTelemetry data in our public beta through the `/enriched` endpoint on the agent's HTTP server, please migrate to the collector to continue using the beta. The collector has a much better implementation of this feature for the beta. (minor [f934d0d4](https://github.com/appsignal/appsignal-ruby/commit/f934d0d496a61779d17caf01b4dff1e2c9f5b92e))
|
257
|
+
|
258
|
+
## 4.4.0
|
259
|
+
|
260
|
+
_Published on 2025-02-06._
|
261
|
+
|
262
|
+
### Changed
|
263
|
+
|
264
|
+
- Do not report error causes if the wrapper error has already been reported. This deduplicates errors and prevents the error wrapper and error cause to be reported separately, as long as the error wrapper is reported first.
|
265
|
+
|
266
|
+
```ruby
|
267
|
+
error_wrapper = nil
|
268
|
+
error_cause = nil
|
269
|
+
begin
|
270
|
+
begin
|
271
|
+
raise StandardError, "error cause"
|
272
|
+
rescue => e
|
273
|
+
error_cause = e
|
274
|
+
raise Exception, "error wrapper"
|
275
|
+
end
|
276
|
+
rescue Exception => e
|
277
|
+
error_wrapper = e
|
278
|
+
end
|
279
|
+
|
280
|
+
Appsignal.report_error(error_wrapper) # Reports error
|
281
|
+
Appsignal.report_error(error_cause) # Doesn't report error
|
282
|
+
```
|
283
|
+
|
284
|
+
(minor [af02b8b3](https://github.com/appsignal/appsignal-ruby/commit/af02b8b356f03b23efe83511970de62281837054))
|
285
|
+
|
286
|
+
### Fixed
|
287
|
+
|
288
|
+
- Fix an issue where the HTTP.rb gem integration would raise an error when a string containing non-ASCII characters is passed to the gem as the URL. (patch [fce0acdf](https://github.com/appsignal/appsignal-ruby/commit/fce0acdfe0a7f807c846c3f90fd79f994c44db0b))
|
289
|
+
|
290
|
+
## 4.3.3
|
291
|
+
|
292
|
+
_Published on 2025-01-17._
|
293
|
+
|
294
|
+
### Added
|
295
|
+
|
296
|
+
- Add support for the [Ownership](https://github.com/ankane/ownership) gem, which is used to mark different segments of the application as owned by specific teams.
|
297
|
+
|
298
|
+
The AppSignal sample will be tagged with the given owner:
|
299
|
+
|
300
|
+
```ruby
|
301
|
+
class OrdersController < ApplicationController
|
302
|
+
owner :logistics
|
303
|
+
# Transactions for requests handled by this controller will be tagged
|
304
|
+
# in AppSignal with the "owner" tag set to "logistics"
|
305
|
+
end
|
306
|
+
```
|
307
|
+
|
308
|
+
If several owners are set within the same transaction, the last owner will take precedence. If an error is reported in the transaction, the owner tag will be set to the owner that was set when the error was raised.
|
309
|
+
|
310
|
+
Set the [`ownership_set_namespace` configuration option](https://docs.appsignal.com/ruby/configuration/options.html#option-ownership_set_namespace) to `true` to also set the AppSignal sample's namespace to the owner. Note that doing so will cause existing performance and error incidents to be re-created with the new namespace.
|
311
|
+
|
312
|
+
Set the [`instrument_ownership` configuration option](https://docs.appsignal.com/ruby/configuration/options.html#option-instrument_ownership) to `false` to disable the integration with the Ownership gem.
|
313
|
+
|
314
|
+
(patch [865b348e](https://github.com/appsignal/appsignal-ruby/commit/865b348e1cf37193e3c31176dad47cbbd5d810bb))
|
315
|
+
|
316
|
+
### Changed
|
317
|
+
|
318
|
+
- Do not report `SystemExit` errors from our Rake integration. (patch [ad4f1a25](https://github.com/appsignal/appsignal-ruby/commit/ad4f1a250f00f1d1997932a3f108b0cf6b99ea43))
|
319
|
+
- Do not report `SignalException` errors from our Rake integration. (patch [7c07a596](https://github.com/appsignal/appsignal-ruby/commit/7c07a59622426ca565c538a0c239270ebbd54f4c))
|
320
|
+
|
321
|
+
### Fixed
|
322
|
+
|
323
|
+
- Fix deprecation warnings when building the AppSignal gem's native extension on Ruby 3.4, by porting the extension to use the TypedData API. (patch [e2d186c9](https://github.com/appsignal/appsignal-ruby/commit/e2d186c9e79a5d03d3692c6ed84ca085e1383031))
|
324
|
+
|
325
|
+
## 4.3.2
|
326
|
+
|
327
|
+
_Published on 2024-12-31._
|
328
|
+
|
329
|
+
### Fixed
|
330
|
+
|
331
|
+
- Fix an issue where loggers, when broadcasted to by `Appsignal::Logger#broadcast_to`, would format again messages that have already been formatted by the broadcaster, causing the resulting message emitted by the logger to contain double newlines. (patch [cd2f9fbf](https://github.com/appsignal/appsignal-ruby/commit/cd2f9fbfe31b39de90bc012ddacaaf9b28fef913))
|
332
|
+
|
333
|
+
## 4.3.1
|
334
|
+
|
335
|
+
_Published on 2024-12-20._
|
336
|
+
|
337
|
+
### Fixed
|
338
|
+
|
339
|
+
- Fix a performance issue when sanitising `INSERT INTO ... VALUES` queries. (patch [9791d9a1](https://github.com/appsignal/appsignal-ruby/commit/9791d9a1ef18bd18b96ad449cae90425a621bfb3))
|
340
|
+
|
341
|
+
## 4.3.0
|
342
|
+
|
343
|
+
_Published on 2024-12-20._
|
344
|
+
|
345
|
+
### Added
|
346
|
+
|
347
|
+
- Add logger broadcasting. This change implements an alternative within `Appsignal::Logger` to `ActiveSupport::BroadcastLogger`, following the same interface. This enables a proper workaround to the issues with `ActiveSupport::BroadcastLogger` (([#49745](https://github.com/rails/rails/issues/49745), [#51883](https://github.com/rails/rails/issues/51883))) when used alongside tagged logging.
|
348
|
+
|
349
|
+
For example, to use tagged logging both in logs emitted by the default `Rails.logger` and in logs sent to AppSignal, replace the `Rails.logger` with an AppSignal logger that broadcasts to the default `Rails.logger`:
|
350
|
+
|
351
|
+
```ruby
|
352
|
+
appsignal_logger = Appsignal::Logger.new("app")
|
353
|
+
appsignal_logger.broadcast_to(Rails.logger)
|
354
|
+
Rails.logger = ActiveSupport::TaggedLogging.new(appsignal_logger)
|
355
|
+
```
|
356
|
+
|
357
|
+
(minor [5cb1464b](https://github.com/appsignal/appsignal-ruby/commit/5cb1464bcf12f043774fb55850e6b82aeba9c1ca))
|
358
|
+
|
359
|
+
### Removed
|
360
|
+
|
361
|
+
- Remove tagged logging support from `Appsignal::Logger`.
|
362
|
+
|
363
|
+
Tagged logging is still supported by wrapping an instance of `Appsignal::Logger` with `ActiveSupport::TaggedLogging`:
|
364
|
+
|
365
|
+
```ruby
|
366
|
+
appsignal_logger = Appsignal::Logger.new("rails")
|
367
|
+
tagged_logger = ActiveSupport::TaggedLogging.new(appsignal_logger)
|
368
|
+
Rails.logger = tagged_logger
|
369
|
+
```
|
370
|
+
|
371
|
+
Removing this functionality allows for a workaround to issues within Rails ([#49745](https://github.com/rails/rails/issues/49745), [#51883](https://github.com/rails/rails/issues/51883)), where using the broadcast logger to log to more than one tagged logger results in incorrect behaviour of the tagged logging methods, resulting in breakage throughout Rails' internals:
|
372
|
+
|
373
|
+
```ruby
|
374
|
+
# We use the built-in request ID middleware as an example that triggers
|
375
|
+
# the issue:
|
376
|
+
Rails.config.log_tags = [:request_id]
|
377
|
+
|
378
|
+
appsignal_logger = Appsignal::Logger.new("rails")
|
379
|
+
tagged_logger = ActiveSupport::TaggedLogging.new(appsignal_logger)
|
380
|
+
|
381
|
+
# This does not work correctly, because the default `Rails.logger` is a
|
382
|
+
# broadcast logger that is already broadcasting to a tagged logger.
|
383
|
+
# When asked to broadcast to a second tagged logger, the return value of
|
384
|
+
# `Rails.logger.tagged { ... }` will be incorrect, in turn causing the
|
385
|
+
# `RequestID` middleware, which uses it internally, to return broken
|
386
|
+
# Rack responses.
|
387
|
+
Rails.logger.broadcast_to(tagged_logger)
|
388
|
+
```
|
389
|
+
|
390
|
+
By reverting the changes to our logger so that it is no longer a tagged logger, we enable a workaround to this issue:
|
391
|
+
|
392
|
+
```ruby
|
393
|
+
Rails.config.log_tags = [:request_id]
|
394
|
+
|
395
|
+
appsignal_logger = Appsignal::Logger.new("rails")
|
396
|
+
|
397
|
+
# This works correctly, because `appsignal_logger` is not a tagged logger.
|
398
|
+
# Note that `appsignal_logger` will not have the `request_id` tags.
|
399
|
+
Rails.logger.broadcast_to(appsignal_logger)
|
400
|
+
```
|
401
|
+
|
402
|
+
(patch [c061aa4e](https://github.com/appsignal/appsignal-ruby/commit/c061aa4e3f9485a1549ea90316534cddd36e238e))
|
403
|
+
|
404
|
+
### Fixed
|
405
|
+
|
406
|
+
- Fix `#silence` implementation for `Appsignal::Logger`. (patch [d08a1cec](https://github.com/appsignal/appsignal-ruby/commit/d08a1cec705db71999afa9c4af36e244a7b6483a))
|
407
|
+
|
408
|
+
## 4.2.3
|
409
|
+
|
410
|
+
_Published on 2024-12-17._
|
411
|
+
|
412
|
+
### Fixed
|
413
|
+
|
414
|
+
- Fix tagged logging ArgumentError error for Rails 8. (patch [8f373074](https://github.com/appsignal/appsignal-ruby/commit/8f373074531d8285b4718c16e125a62f42774d90))
|
415
|
+
|
416
|
+
## 4.2.2
|
417
|
+
|
418
|
+
_Published on 2024-12-16._
|
419
|
+
|
420
|
+
### Added
|
421
|
+
|
422
|
+
- Support Rails/ActiveSupport tagged logging. When tags are set in apps using `Rails.logger.tagged { ... }` or with the `Rails.application.config.log_tags = [...]` config option, these tags are now included in the collected log messages.
|
423
|
+
|
424
|
+
```ruby
|
425
|
+
Rails.logger.tagged(["Tag 1", "Tag 2"]) { Rails.logger.info("My message") }
|
426
|
+
```
|
427
|
+
|
428
|
+
Reports this log message:
|
429
|
+
|
430
|
+
> [Tag 1] [Tag 2] My message
|
431
|
+
|
432
|
+
(patch [41e1e8f0](https://github.com/appsignal/appsignal-ruby/commit/41e1e8f076025da2420cb43c53b5f7211ae45de8))
|
433
|
+
|
434
|
+
### Fixed
|
435
|
+
|
436
|
+
- Fix a thread safety issue where sending check-in events simultaneously from different threads would cause several check-in schedulers to be initialised internally. This could cause some of the scheduled check-in events to never be sent to AppSignal when `Appsignal.stop` is called. (patch [c372a3f9](https://github.com/appsignal/appsignal-ruby/commit/c372a3f998b78ef5ef259be39fe198433d6ca95e))
|
437
|
+
|
438
|
+
## 4.2.1
|
439
|
+
|
440
|
+
_Published on 2024-12-04._
|
441
|
+
|
442
|
+
### Changed
|
443
|
+
|
444
|
+
- Minimize difference between Rack transaction duration and total child event durations. (patch [95c37802](https://github.com/appsignal/appsignal-ruby/commit/95c3780291241fa6de8d2c0ae9bb09d3ce42d18d))
|
445
|
+
|
3
446
|
## 4.2.0
|
4
447
|
|
5
448
|
_Published on 2024-11-13._
|
data/README.md
CHANGED
@@ -9,9 +9,6 @@ issues.
|
|
9
9
|
- [Ruby code documentation][ruby-doc]
|
10
10
|
- [Support][contact]
|
11
11
|
|
12
|
-
[](http://badge.fury.io/rb/appsignal)
|
13
|
-
[](https://codeclimate.com/github/appsignal/appsignal)
|
14
|
-
|
15
12
|
## Description
|
16
13
|
|
17
14
|
The AppSignal gem collects exceptions and performance data from your Ruby
|
data/Rakefile
CHANGED
@@ -357,7 +357,7 @@ end
|
|
357
357
|
begin
|
358
358
|
require "rspec/core/rake_task"
|
359
359
|
is_jruby = defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
|
360
|
-
excludes = []
|
360
|
+
excludes = ["spec/integration/diagnose/**/*_spec.rb"]
|
361
361
|
excludes << "spec/lib/appsignal/extension/jruby_spec.rb" unless is_jruby
|
362
362
|
exclude_pattern = "--exclude-pattern=#{excludes.join(",")}" if excludes.any?
|
363
363
|
|
data/appsignal.gemspec
CHANGED
@@ -57,7 +57,8 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
57
57
|
}
|
58
58
|
|
59
59
|
gem.add_dependency "logger"
|
60
|
-
|
60
|
+
# Needs 2.0+ because we rely on Rack::Events
|
61
|
+
gem.add_dependency "rack", ">= 2.0.0"
|
61
62
|
|
62
63
|
gem.add_development_dependency "pry"
|
63
64
|
gem.add_development_dependency "rake", ">= 12"
|
data/build_matrix.yml
CHANGED
@@ -88,6 +88,8 @@ matrix:
|
|
88
88
|
- "rails-8.0"
|
89
89
|
|
90
90
|
ruby:
|
91
|
+
- ruby: "3.5.0-preview1"
|
92
|
+
- ruby: "3.4.1"
|
91
93
|
- ruby: "3.3.4"
|
92
94
|
- ruby: "3.2.5"
|
93
95
|
- ruby: "3.1.6"
|
@@ -102,6 +104,8 @@ matrix:
|
|
102
104
|
- gem: "dry-monitor"
|
103
105
|
only:
|
104
106
|
ruby:
|
107
|
+
- "3.5.0-preview1"
|
108
|
+
- "3.4.1"
|
105
109
|
- "3.3.4"
|
106
110
|
- "3.2.5"
|
107
111
|
- "3.1.6"
|
@@ -110,6 +114,8 @@ matrix:
|
|
110
114
|
- gem: "hanami-2.0"
|
111
115
|
only:
|
112
116
|
ruby:
|
117
|
+
- "3.5.0-preview1"
|
118
|
+
- "3.4.1"
|
113
119
|
- "3.3.4"
|
114
120
|
- "3.2.5"
|
115
121
|
- "3.1.6"
|
@@ -117,6 +123,8 @@ matrix:
|
|
117
123
|
- gem: "hanami-2.1"
|
118
124
|
only:
|
119
125
|
ruby:
|
126
|
+
- "3.5.0-preview1"
|
127
|
+
- "3.4.1"
|
120
128
|
- "3.3.4"
|
121
129
|
- "3.2.5"
|
122
130
|
- "3.1.6"
|
@@ -124,14 +132,19 @@ matrix:
|
|
124
132
|
- gem: "hanami-2.2"
|
125
133
|
only:
|
126
134
|
ruby:
|
135
|
+
- "3.5.0-preview1"
|
136
|
+
- "3.4.1"
|
127
137
|
- "3.3.4"
|
128
138
|
- "3.2.5"
|
129
139
|
- "3.1.6"
|
130
140
|
- gem: "http5"
|
141
|
+
- gem: "ownership"
|
131
142
|
- gem: "padrino"
|
132
143
|
- gem: "psych-3"
|
133
144
|
only:
|
134
145
|
ruby:
|
146
|
+
- "3.5.0-preview1"
|
147
|
+
- "3.4.1"
|
135
148
|
- "3.3.4"
|
136
149
|
- "3.2.5"
|
137
150
|
- "3.1.6"
|
@@ -140,6 +153,8 @@ matrix:
|
|
140
153
|
- gem: "psych-4"
|
141
154
|
only:
|
142
155
|
ruby:
|
156
|
+
- "3.5.0-preview1"
|
157
|
+
- "3.4.1"
|
143
158
|
- "3.3.4"
|
144
159
|
- "3.2.5"
|
145
160
|
- "3.1.6"
|
@@ -165,6 +180,8 @@ matrix:
|
|
165
180
|
- gem: "rails-7.0"
|
166
181
|
only:
|
167
182
|
ruby:
|
183
|
+
- "3.5.0-preview1"
|
184
|
+
- "3.4.1"
|
168
185
|
- "3.3.4"
|
169
186
|
- "3.2.5"
|
170
187
|
- "3.1.6"
|
@@ -174,6 +191,8 @@ matrix:
|
|
174
191
|
- gem: "rails-7.1"
|
175
192
|
only:
|
176
193
|
ruby:
|
194
|
+
- "3.5.0-preview1"
|
195
|
+
- "3.4.1"
|
177
196
|
- "3.3.4"
|
178
197
|
- "3.2.5"
|
179
198
|
- "3.1.6"
|
@@ -182,6 +201,8 @@ matrix:
|
|
182
201
|
- gem: "rails-7.2"
|
183
202
|
only:
|
184
203
|
ruby:
|
204
|
+
- "3.5.0-preview1"
|
205
|
+
- "3.4.1"
|
185
206
|
- "3.3.4"
|
186
207
|
- "3.2.5"
|
187
208
|
- "3.1.6"
|
@@ -189,6 +210,8 @@ matrix:
|
|
189
210
|
- gem: "rails-8.0"
|
190
211
|
only:
|
191
212
|
ruby:
|
213
|
+
- "3.5.0-preview1"
|
214
|
+
- "3.4.1"
|
192
215
|
- "3.3.4"
|
193
216
|
- "3.2.5"
|
194
217
|
- gem: "sequel"
|
@@ -196,3 +219,13 @@ matrix:
|
|
196
219
|
- gem: "webmachine2"
|
197
220
|
- gem: "redis-4"
|
198
221
|
- gem: "redis-5"
|
222
|
+
- gem: "sidekiq-7"
|
223
|
+
only:
|
224
|
+
ruby:
|
225
|
+
- "3.5.0-preview1"
|
226
|
+
- "3.4.1"
|
227
|
+
- gem: "sidekiq-8"
|
228
|
+
only:
|
229
|
+
ruby:
|
230
|
+
- "3.5.0-preview1"
|
231
|
+
- "3.4.1"
|