appsignal 5.0.3-java → 5.0.5-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f511b69fdbdeb226062bbaf05e00fe52eb3bd20854c3eeb202edba0b815b1db5
4
- data.tar.gz: e1261b245afbc044c149b030ba2b4f4656c7d56f56e37223006ed21a68d1a8be
3
+ metadata.gz: 92d13e2b35b149e4c71c6875cd1bc2b7a12f5b1606d399a55cbe215680cd2716
4
+ data.tar.gz: f1539b975529f533fc75fcf26d4951750795f7c98fd21a46ba66b21dd06e90b8
5
5
  SHA512:
6
- metadata.gz: a18f025051286fc68ff81d27cdc6d4d2fd91b71f79e3d439a9d957e39c98350c9dd46fc7626738c8dfddd13908f13884f9be13155475dedfc8e2844e10f44021
7
- data.tar.gz: eb8047d550aaa8afd456483ef40db0d188ba492215e582b6f7ddc5c73b6d7e1d957c39bf0183e2b2d5fa1dbd5531a5064d66ac874a1112193feddf9d90f1cd94
6
+ metadata.gz: dd0b379011e0638e063344d7031c0e34d345c3c58c5aecda53170795f09fc3dd750ccf8ecfe941fc90d24bae5adcba063c3c9737f8dc2d61f734b4c5a8e5e826
7
+ data.tar.gz: 4db75f1484b583a14247bfd09d89d65e7ac14bbbfcc819f351e35fc7470da99fc5dc055d30db2257100b8ba44005198aa5b3d87dcab54caedf3eacfc2e437ac8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 5.0.5
4
+
5
+ _Published on 2026-10-14._
6
+
7
+ ### Added
8
+
9
+ - Automatically detect the application's revision from the `HEROKU_BUILD_COMMIT`
10
+ environment variable, which is set by Heroku at build time [when the
11
+ `runtime-dyno-build-metadata` Heroku Labs
12
+ feature](https://devcenter.heroku.com/articles/dyno-metadata) is enabled.
13
+
14
+ (patch [ab022837](https://github.com/appsignal/appsignal-ruby/commit/ab022837c17b85dcd213fde755ae456231fdba9a))
15
+ - Automatically detect the application's revision from the `HEROKU_BUILD_COMMIT`
16
+ environment variable, which is set by Heroku at build time [when the
17
+ `runtime-dyno-build-metadata` Heroku Labs
18
+ feature](https://devcenter.heroku.com/articles/dyno-metadata) is enabled.
19
+
20
+ (patch [6fb3cd87](https://github.com/appsignal/appsignal-ruby/commit/6fb3cd872ad9e3950fa12772f02fbab98fa6cce5))
21
+
22
+ ## 5.0.4
23
+
24
+ _Published on 2026-10-09._
25
+
26
+ ### Fixed
27
+
28
+ - Fix an issue where transactions would be reused across requests when an error happened before the transaction could be closed, which would lead to errors being returned by the app itself. (patch [65ff0be0](https://github.com/appsignal/appsignal-ruby/commit/65ff0be0c3d4dea2eb9ed5bdb81004e899e6edf4))
29
+
3
30
  ## 5.0.3
4
31
 
5
32
  _Published on 2026-10-08._
data/README.md CHANGED
@@ -308,7 +308,7 @@ Also see our [SUPPORT.md file](SUPPORT.md).
308
308
  [appsignal]: https://www.appsignal.com/ruby
309
309
  [appsignal-sign-up]: https://appsignal.com/users/sign_up
310
310
  [contact]: mailto:support@appsignal.com
311
- [coc]: https://docs.appsignal.com/appsignal/code-of-conduct.html
311
+ [coc]: https://docs.appsignal.com/appsignal/contributing/code-of-conduct
312
312
  [waffles-page]: https://www.appsignal.com/waffles
313
313
  [docs]: https://docs.appsignal.com
314
314
  [ruby-doc]: https://www.rubydoc.info/gems/appsignal
@@ -319,7 +319,7 @@ Also see our [SUPPORT.md file](SUPPORT.md).
319
319
  [front-end-monitoring]: https://docs.appsignal.com/front-end.html
320
320
  [exception-handling]: https://docs.appsignal.com/ruby/instrumentation/exception-handling.html
321
321
  [tagging]: https://docs.appsignal.com/guides/tagging#ruby
322
- [host-metrics]: https://docs.appsignal.com/metrics/host.html
322
+ [host-metrics]: https://docs.appsignal.com/metrics/host-metrics
323
323
  [custom-metrics]: https://docs.appsignal.com/metrics/custom.html
324
324
 
325
325
  [semver]: http://semver.org/
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.37.3",
9
+ "version" => "0.37.5",
10
10
  "mirrors" => [
11
11
  "https://d135dj0rjqvssy.cloudfront.net",
12
12
  "https://appsignal-agent-releases.global.ssl.fastly.net"
@@ -14,131 +14,131 @@ APPSIGNAL_AGENT_CONFIG = {
14
14
  "triples" => {
15
15
  "x86_64-darwin" => {
16
16
  "static" => {
17
- "checksum" => "283afa4ec2222108c994cf3c943357f649a9e09a200c0b3b06d33b9fefa8487f",
17
+ "checksum" => "0c5f9fd85bf0a2468862c8a591e40120e346cee18f2240a46b7bcce0d880ea84",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "a8738c9de75f751a3ed09fbe8129d163002ad1c036a37f47089629289a60ae3b",
21
+ "checksum" => "bc4845f14246bf775881c290b29e4887e0422edf2877a0df66417af48577bc60",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "283afa4ec2222108c994cf3c943357f649a9e09a200c0b3b06d33b9fefa8487f",
27
+ "checksum" => "0c5f9fd85bf0a2468862c8a591e40120e346cee18f2240a46b7bcce0d880ea84",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "a8738c9de75f751a3ed09fbe8129d163002ad1c036a37f47089629289a60ae3b",
31
+ "checksum" => "bc4845f14246bf775881c290b29e4887e0422edf2877a0df66417af48577bc60",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "201b0d402c8685492899ba5cbd4d1ff3d6389d0b5fe2cc5ff62cd9a1f4a57f19",
37
+ "checksum" => "844b7e189522b5ffee6370e5dbff2a687de5b4c2e34f67a638290a2e40dd0ec3",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "85f471e3da1fe69b9a900ed0a907aaf8bffdc4ada978809c8427704e7b40276c",
41
+ "checksum" => "e69f3f923aeec06e45bf2263afa3390b561528dc129be581cba047ec7545829f",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "201b0d402c8685492899ba5cbd4d1ff3d6389d0b5fe2cc5ff62cd9a1f4a57f19",
47
+ "checksum" => "844b7e189522b5ffee6370e5dbff2a687de5b4c2e34f67a638290a2e40dd0ec3",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "85f471e3da1fe69b9a900ed0a907aaf8bffdc4ada978809c8427704e7b40276c",
51
+ "checksum" => "e69f3f923aeec06e45bf2263afa3390b561528dc129be581cba047ec7545829f",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "201b0d402c8685492899ba5cbd4d1ff3d6389d0b5fe2cc5ff62cd9a1f4a57f19",
57
+ "checksum" => "844b7e189522b5ffee6370e5dbff2a687de5b4c2e34f67a638290a2e40dd0ec3",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "85f471e3da1fe69b9a900ed0a907aaf8bffdc4ada978809c8427704e7b40276c",
61
+ "checksum" => "e69f3f923aeec06e45bf2263afa3390b561528dc129be581cba047ec7545829f",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "f8e67ca70c013908d0d5b1b0a78aa67be59f5bb885590ab6c70b0f2bc4d9148c",
67
+ "checksum" => "3644566bc411f8f4c9937e53eccdd7bbea4545ddcc8a93db0158c6174f21a399",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "5cf0739c2a1f836973d903ea7b8232b867ded08f4e4fdc2d1ace1191c5848516",
71
+ "checksum" => "91fc23f738f51ce12992f2833bc84f82ad42a4d74876cd6b67849de4df261db8",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "c52333b87c6da6b2b979097c07d13925104b5d535e6287babc71566c3fdcf321",
77
+ "checksum" => "29d534d174d955e0d86c572f1e9ce0ee7c9d9baa98d9f472ff501a79d1bc7dbd",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "4831ad90d246eef552d567d3a3f429aa191b9b3c6d80ab4b4dcc1bcc69eccfd5",
81
+ "checksum" => "bac6a565f6cc2031422f6dcd19c9b6af8d4e2c98d867fb2f2dea9eb9d2a0fbf3",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "c52333b87c6da6b2b979097c07d13925104b5d535e6287babc71566c3fdcf321",
87
+ "checksum" => "29d534d174d955e0d86c572f1e9ce0ee7c9d9baa98d9f472ff501a79d1bc7dbd",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "4831ad90d246eef552d567d3a3f429aa191b9b3c6d80ab4b4dcc1bcc69eccfd5",
91
+ "checksum" => "bac6a565f6cc2031422f6dcd19c9b6af8d4e2c98d867fb2f2dea9eb9d2a0fbf3",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "5d2816036d1025eecc7005114780120788c0a76ff899740ebaa54f063aff7a18",
97
+ "checksum" => "ba12a448ba337bfecf2a8dd2e67804f273c460973a2f191c87e26e612b7edb7c",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "2e1849c946a58a2c1dce772949b28b88eb7656eee43211b0e9c3cb64103df278",
101
+ "checksum" => "dc673d9935bf99ea9dd85bd25212f0253de9790a09010cb58bea80ee04d67c5f",
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" => "937e4517d435898518a0b529196160682172c1eec32e6ab31ad9b4e7220705fe",
107
+ "checksum" => "4331b313e952e2e54a8d217b08f2ff9d704a5581935617e1bfaff20f0680caef",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "b3d7730f4112b376f4aceb8197c262c446cf056787a7971046b76a42a9f326e6",
111
+ "checksum" => "88d62670845fd020f3cdce345f48911fe9da2d8be7aa3ca439ce352dd22d427d",
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" => "fd9abfd9320bf893aed80d9487aab2e5da0af33c48e6c54a284f87c1a00c9af3",
117
+ "checksum" => "364cc397eddf43049c87fc87a385d9cbc7722cdd11ffa2f5052c24e19e0e5d69",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "75642949d2fff2b3878e9d8a229ada0560bf6d273cc27e694868ad85f2ce2843",
121
+ "checksum" => "c707f5a648a35e2ed1eecbb8ac7a05339e404a9da5301e3920712983c200b904",
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" => "e79ecb04aabb439e1b0aaa829dddec01886758843f3e29a46d8922688719af26",
127
+ "checksum" => "f1ece6d2f2b0a36a86a4a48059deea89b3ae909c0aafc659372127f072d036ec",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "3aa2dfe2c22f42c0d97b93bb21917180e0399359cc3d86786c62aeb6fcaa96c6",
131
+ "checksum" => "d2d620e3ca6a466ccdd556a7736e1645070e2b326ede41eaf7d34ff38de88d73",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "e79ecb04aabb439e1b0aaa829dddec01886758843f3e29a46d8922688719af26",
137
+ "checksum" => "f1ece6d2f2b0a36a86a4a48059deea89b3ae909c0aafc659372127f072d036ec",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "3aa2dfe2c22f42c0d97b93bb21917180e0399359cc3d86786c62aeb6fcaa96c6",
141
+ "checksum" => "d2d620e3ca6a466ccdd556a7736e1645070e2b326ede41eaf7d34ff38de88d73",
142
142
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
143
143
  }
144
144
  }
@@ -180,6 +180,7 @@ module Appsignal
180
180
  # revision that is being deployed, in the order they are read.
181
181
  # @!visibility private
182
182
  PLATFORM_REVISION_ENV_VARS = [
183
+ "HEROKU_BUILD_COMMIT",
183
184
  "HEROKU_SLUG_COMMIT",
184
185
  "RENDER_GIT_COMMIT",
185
186
  "KAMAL_VERSION",
@@ -37,6 +37,15 @@ module Appsignal
37
37
  )
38
38
  end
39
39
 
40
+ # @api private
41
+ def self.complete_transaction(transaction)
42
+ safe_execution("Appsignal::Rack::EventHandler#complete_transaction") do
43
+ transaction.complete
44
+ end
45
+ ensure
46
+ Appsignal::Transaction.clear_current_transaction!
47
+ end
48
+
40
49
  # @api private
41
50
  attr_reader :id
42
51
  attr_writer :using_appsignal_event_middleware
@@ -68,29 +77,7 @@ module Appsignal
68
77
  :opentelemetry_context => Appsignal::OpenTelemetry.extract_rack_context(request.env),
69
78
  :opentelemetry_scope => ["appsignal-ruby/rack", Appsignal::VERSION]
70
79
  )
71
- # Describes the transaction's span as an incoming HTTP request.
72
- # Together with the SERVER span kind the transaction already carries,
73
- # this is what the trace timeline reads to recognize a web request.
74
- #
75
- # Set before the event below starts, because attributes go on
76
- # whichever span is open and these belong on the transaction's own
77
- # span. That event stays open until the response finishes, so there is
78
- # no later point in the request at which these could be set.
79
- transaction.add_opentelemetry_attributes(
80
- Appsignal::OpenTelemetry::HttpServerRequest.attributes_for(
81
- :method => Appsignal::Rack::Utils.request_method_from(request),
82
- :path => Appsignal::Rack::Utils.request_value_from(request, :path),
83
- :scheme => Appsignal::Rack::Utils.request_value_from(request, :scheme),
84
- :query => Appsignal::Rack::Utils.request_value_from(request, :query_string),
85
- :host => Appsignal::Rack::Utils.request_value_from(request, :hostname),
86
- :port => Appsignal::Rack::Utils.request_value_from(request, :port),
87
- :protocol =>
88
- Appsignal::Rack::Utils.request_env_value_from(request, "SERVER_PROTOCOL")
89
- )
90
- )
91
- transaction.start_event(
92
- :opentelemetry_scope => ["appsignal-ruby/rack", Appsignal::VERSION]
93
- )
80
+ # Register cleanup before request instrumentation can raise.
94
81
  request.env[APPSIGNAL_TRANSACTION] = transaction
95
82
 
96
83
  request.env[RACK_AFTER_REPLY] ||= []
@@ -113,9 +100,32 @@ module Appsignal
113
100
  # just a fallback if that doesn't get called.
114
101
  #
115
102
  # One such scenario is when a Puma "lowlevel_error" occurs.
116
- transaction.complete
117
- Appsignal::Transaction.clear_current_transaction!
103
+ Appsignal::Rack::EventHandler.complete_transaction(transaction)
118
104
  end
105
+
106
+ # Describes the transaction's span as an incoming HTTP request.
107
+ # Together with the SERVER span kind the transaction already carries,
108
+ # this is what the trace timeline reads to recognize a web request.
109
+ #
110
+ # Set before the event below starts, because attributes go on
111
+ # whichever span is open and these belong on the transaction's own
112
+ # span. That event stays open until the response finishes, so there is
113
+ # no later point in the request at which these could be set.
114
+ transaction.add_opentelemetry_attributes(
115
+ Appsignal::OpenTelemetry::HttpServerRequest.attributes_for(
116
+ :method => Appsignal::Rack::Utils.request_method_from(request),
117
+ :path => Appsignal::Rack::Utils.request_value_from(request, :path),
118
+ :scheme => Appsignal::Rack::Utils.request_value_from(request, :scheme),
119
+ :query => Appsignal::Rack::Utils.request_value_from(request, :query_string),
120
+ :host => Appsignal::Rack::Utils.request_value_from(request, :hostname),
121
+ :port => Appsignal::Rack::Utils.request_value_from(request, :port),
122
+ :protocol =>
123
+ Appsignal::Rack::Utils.request_env_value_from(request, "SERVER_PROTOCOL")
124
+ )
125
+ )
126
+ transaction.start_event(
127
+ :opentelemetry_scope => ["appsignal-ruby/rack", Appsignal::VERSION]
128
+ )
119
129
  end
120
130
  end
121
131
 
@@ -188,8 +198,7 @@ module Appsignal
188
198
 
189
199
  # Make sure the current transaction is always closed when the request
190
200
  # is finished
191
- transaction.complete
192
- Appsignal::Transaction.clear_current_transaction!
201
+ self.class.complete_transaction(transaction)
193
202
  end
194
203
 
195
204
  private
@@ -446,6 +446,7 @@ module Appsignal
446
446
  emit_queue_duration_metric if should_report?
447
447
  report_allocation_count
448
448
  end
449
+ ensure
449
450
  teardown
450
451
  end
451
452
 
@@ -316,26 +316,30 @@ module Appsignal
316
316
  return
317
317
  end
318
318
 
319
- # If the transaction is a duplicate, we don't want to finish it,
320
- # because we want its finish time to be the finish time of the
321
- # original transaction.
322
- # Duplicate transactions should always be sampled, as we only
323
- # create duplicates for errors, which are always sampled.
324
- should_sample = true
325
-
326
- unless duplicate?
327
- self.class.last_errors = @errors.to_a
328
- should_sample = @backend.finish
329
- end
330
-
331
- report_errors
319
+ begin
320
+ # If the transaction is a duplicate, we don't want to finish it,
321
+ # because we want its finish time to be the finish time of the
322
+ # original transaction.
323
+ # Duplicate transactions should always be sampled, as we only
324
+ # create duplicates for errors, which are always sampled.
325
+ should_sample = true
326
+
327
+ unless duplicate?
328
+ self.class.last_errors = @errors.to_a
329
+ should_sample = @backend.finish
330
+ end
332
331
 
333
- run_before_complete_hooks
332
+ report_errors
334
333
 
335
- sample_data if should_sample
334
+ run_before_complete_hooks
336
335
 
337
- @completed = true
338
- @backend.complete
336
+ sample_data if should_sample
337
+ ensure
338
+ # Release backend resources even when sample data cannot be collected
339
+ # or serialized. In collector mode this also detaches the span context.
340
+ @completed = true
341
+ @backend.complete
342
+ end
339
343
  end
340
344
 
341
345
  # @!visibility private
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Appsignal
4
4
  # @return [String]
5
- VERSION = "5.0.3"
5
+ VERSION = "5.0.5"
6
6
  end
data/sig/appsignal.rbi CHANGED
@@ -8,7 +8,7 @@
8
8
  module Appsignal
9
9
  extend Appsignal::Helpers::Metrics
10
10
  extend Appsignal::Helpers::Instrumentation
11
- VERSION = T.let("5.0.3", T.untyped)
11
+ VERSION = T.let("5.0.5", T.untyped)
12
12
 
13
13
  class << self
14
14
  # The loaded AppSignal configuration.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.0.5
5
5
  platform: java
6
6
  authors:
7
7
  - Robert Beekman