appsignal 4.5.9 → 4.5.13

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: 310b4be83259ef19477bbeebd217658857a580b8c4e0da5efe55c81371033004
4
- data.tar.gz: 33edb8be5942b17f3b503e56bebd3bb7e981a0d8959119641c84540d696ea06f
3
+ metadata.gz: f462fd8fc28aa3a2a6028261d58ab86697d2b8070ddc1046a6cd28dca037eedf
4
+ data.tar.gz: abfeb2be7e98cad19da981bcc54206fad3a6a07308ed5d4ac0b03043c471b716
5
5
  SHA512:
6
- metadata.gz: fc7f5a860430c5a5eb8fbb96621cac0f7b6db67aa05785d874b7d1079335a538e152cdab26694a624174f9664ee0b432cca70fade7afc7a001e8ce6f01818e9b
7
- data.tar.gz: fd964bc1242b0dbade63d7c10dd00f7e2e7cad4b000c1acf8134ed8f9b17a69bd0205456f9bc18a353874112b34bdd216ed6024bae5b186d59ef38a0bf1e507c
6
+ metadata.gz: 1a55c84c2f35efc21b0e64bbefbd4d6af3141643567629bab715a5133560a23e64f71a9f9f198da006c63cfd4d99ef6ab7f0e95f5ca0ad55f4ff52d74739d54a
7
+ data.tar.gz: 26e857ed78d111e6c504715de0a967992a9c2b16cf22defe5bb388516db882104fe296b93375e77457f60b87c938290f1e010c90f4f2b1a8a881a67964e358cb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 4.5.13
4
+
5
+ _Published on 2025-05-12._
6
+
7
+ ### Fixed
8
+
9
+ - 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))
10
+
11
+ ## 4.5.12
12
+
13
+ _Published on 2025-05-12._
14
+
15
+ ### Added
16
+
17
+ - 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))
18
+
19
+ ## 4.5.11
20
+
21
+ _Published on 2025-05-08._
22
+
23
+ ### Changed
24
+
25
+ - 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))
26
+
27
+ ## 4.5.10
28
+
29
+ _Published on 2025-05-05._
30
+
31
+ ### Changed
32
+
33
+ - 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))
34
+
3
35
  ## 4.5.9
4
36
 
5
37
  _Published on 2025-04-09._
data/README.md CHANGED
@@ -9,9 +9,6 @@ issues.
9
9
  - [Ruby code documentation][ruby-doc]
10
10
  - [Support][contact]
11
11
 
12
- [![Gem Version](https://badge.fury.io/rb/appsignal.svg)](http://badge.fury.io/rb/appsignal)
13
- [![Code Climate](https://codeclimate.com/github/appsignal/appsignal.png)](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/build_matrix.yml CHANGED
@@ -88,6 +88,7 @@ matrix:
88
88
  - "rails-8.0"
89
89
 
90
90
  ruby:
91
+ - ruby: "3.5.0-preview1"
91
92
  - ruby: "3.4.1"
92
93
  - ruby: "3.3.4"
93
94
  - ruby: "3.2.5"
@@ -103,6 +104,7 @@ matrix:
103
104
  - gem: "dry-monitor"
104
105
  only:
105
106
  ruby:
107
+ - "3.5.0-preview1"
106
108
  - "3.4.1"
107
109
  - "3.3.4"
108
110
  - "3.2.5"
@@ -112,6 +114,7 @@ matrix:
112
114
  - gem: "hanami-2.0"
113
115
  only:
114
116
  ruby:
117
+ - "3.5.0-preview1"
115
118
  - "3.4.1"
116
119
  - "3.3.4"
117
120
  - "3.2.5"
@@ -120,6 +123,7 @@ matrix:
120
123
  - gem: "hanami-2.1"
121
124
  only:
122
125
  ruby:
126
+ - "3.5.0-preview1"
123
127
  - "3.4.1"
124
128
  - "3.3.4"
125
129
  - "3.2.5"
@@ -128,6 +132,7 @@ matrix:
128
132
  - gem: "hanami-2.2"
129
133
  only:
130
134
  ruby:
135
+ - "3.5.0-preview1"
131
136
  - "3.4.1"
132
137
  - "3.3.4"
133
138
  - "3.2.5"
@@ -138,6 +143,7 @@ matrix:
138
143
  - gem: "psych-3"
139
144
  only:
140
145
  ruby:
146
+ - "3.5.0-preview1"
141
147
  - "3.4.1"
142
148
  - "3.3.4"
143
149
  - "3.2.5"
@@ -147,6 +153,7 @@ matrix:
147
153
  - gem: "psych-4"
148
154
  only:
149
155
  ruby:
156
+ - "3.5.0-preview1"
150
157
  - "3.4.1"
151
158
  - "3.3.4"
152
159
  - "3.2.5"
@@ -173,6 +180,7 @@ matrix:
173
180
  - gem: "rails-7.0"
174
181
  only:
175
182
  ruby:
183
+ - "3.5.0-preview1"
176
184
  - "3.4.1"
177
185
  - "3.3.4"
178
186
  - "3.2.5"
@@ -183,6 +191,7 @@ matrix:
183
191
  - gem: "rails-7.1"
184
192
  only:
185
193
  ruby:
194
+ - "3.5.0-preview1"
186
195
  - "3.4.1"
187
196
  - "3.3.4"
188
197
  - "3.2.5"
@@ -192,6 +201,7 @@ matrix:
192
201
  - gem: "rails-7.2"
193
202
  only:
194
203
  ruby:
204
+ - "3.5.0-preview1"
195
205
  - "3.4.1"
196
206
  - "3.3.4"
197
207
  - "3.2.5"
@@ -200,6 +210,7 @@ matrix:
200
210
  - gem: "rails-8.0"
201
211
  only:
202
212
  ruby:
213
+ - "3.5.0-preview1"
203
214
  - "3.4.1"
204
215
  - "3.3.4"
205
216
  - "3.2.5"
@@ -211,8 +222,10 @@ matrix:
211
222
  - gem: "sidekiq-7"
212
223
  only:
213
224
  ruby:
225
+ - "3.5.0-preview1"
214
226
  - "3.4.1"
215
227
  - gem: "sidekiq-8"
216
228
  only:
217
229
  ruby:
230
+ - "3.5.0-preview1"
218
231
  - "3.4.1"
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.36.3",
9
+ "version" => "0.36.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" => "ed3454688e7cd976aec81a7826900027ce6508f790e7f53c97484e40c128bd36",
17
+ "checksum" => "174222cc211a50eefa35f1b2391f94ea1a0fede07ab4210f90764ea4353e24f7",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "b559c97425ffef908258a5d2ea67477e364be90dc8e28b5747776c340c7b8c65",
21
+ "checksum" => "5057e7e99d033765bc49e949f2c313299430cdcdce257d2ee2e7f0565be38776",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "ed3454688e7cd976aec81a7826900027ce6508f790e7f53c97484e40c128bd36",
27
+ "checksum" => "174222cc211a50eefa35f1b2391f94ea1a0fede07ab4210f90764ea4353e24f7",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "b559c97425ffef908258a5d2ea67477e364be90dc8e28b5747776c340c7b8c65",
31
+ "checksum" => "5057e7e99d033765bc49e949f2c313299430cdcdce257d2ee2e7f0565be38776",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "43f66e1da26e9b15050392105868f8c99e28e89d7831a0e09d8d8b54abaa24d2",
37
+ "checksum" => "54d9687a716c5e607f92aa93782b1c64fe064d4a42c58473e0b07eb313378103",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "f6d9d48fa91873ffd7f54af94bb463c266bbca9d86f2ec4253b43b7290f6f479",
41
+ "checksum" => "3b6e420e306856c3d35fefb3a1e0b57cbc4623732a661517ccb75ab0657b5aa5",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "43f66e1da26e9b15050392105868f8c99e28e89d7831a0e09d8d8b54abaa24d2",
47
+ "checksum" => "54d9687a716c5e607f92aa93782b1c64fe064d4a42c58473e0b07eb313378103",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "f6d9d48fa91873ffd7f54af94bb463c266bbca9d86f2ec4253b43b7290f6f479",
51
+ "checksum" => "3b6e420e306856c3d35fefb3a1e0b57cbc4623732a661517ccb75ab0657b5aa5",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "43f66e1da26e9b15050392105868f8c99e28e89d7831a0e09d8d8b54abaa24d2",
57
+ "checksum" => "54d9687a716c5e607f92aa93782b1c64fe064d4a42c58473e0b07eb313378103",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "f6d9d48fa91873ffd7f54af94bb463c266bbca9d86f2ec4253b43b7290f6f479",
61
+ "checksum" => "3b6e420e306856c3d35fefb3a1e0b57cbc4623732a661517ccb75ab0657b5aa5",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "287caad6b86b5d2bfe36ae87179d8f587e0cb76c80cdf4f3300b32e37553d9cb",
67
+ "checksum" => "59746a7fe722eb9c985e155aeaefdab37d96a96f650eff81b8610955b09edebb",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "6db055791a2b588edb4394afc2978309e4fea8ac5c3b14cd3b25913b6fc183c3",
71
+ "checksum" => "6a8c597ed646790c6a70913a8be70e2cc7cc022a3ffedf7b1df6e003b1781aea",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "816ca2ec568680ec8e44ee8dfa1a014062c4a8969883ddb4533610489eb689b0",
77
+ "checksum" => "4202807069dcd2b9df2c478273f7ce23f88e47224e75a5062592ed6af8a675ec",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "a2f5e885812510a77a36c0044150e321a3cca1354310d4b9be6f0ef7971c93e2",
81
+ "checksum" => "34a6b6502eb924c60fe98a4c0d62fc83b8ca210beb334c559f909cad24276312",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "816ca2ec568680ec8e44ee8dfa1a014062c4a8969883ddb4533610489eb689b0",
87
+ "checksum" => "4202807069dcd2b9df2c478273f7ce23f88e47224e75a5062592ed6af8a675ec",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "a2f5e885812510a77a36c0044150e321a3cca1354310d4b9be6f0ef7971c93e2",
91
+ "checksum" => "34a6b6502eb924c60fe98a4c0d62fc83b8ca210beb334c559f909cad24276312",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "6b48d90f89a3e687e440147d18717913857409fff66022b29a4107379f1d0903",
97
+ "checksum" => "948ae7a80b5c33807ddfd7f7e575515db76868dc4750993e658a19920db43d99",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "141cc47e66c18782a9c6c7d175b54e681034f6f39b6e871d5e60160f5d1a1f3e",
101
+ "checksum" => "bdc95b8c5da28802c4023eb48d30aa7f8c4ec85484436d083f43fea0087c946e",
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" => "9c74fbfa5bdef7df3d4fc6f8da73635b351c71b8d6e4c1ca9916b2f3dae0d7e7",
107
+ "checksum" => "e9d717aecfe1a7bcc139289b8aa10d3e4e52f487776cd1a26025ac13b55b7754",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "576853c59aab8f7542e9bb9a612df626f6b56e78d1ce7c6fc8c725db4417a4a1",
111
+ "checksum" => "bef8053e0bf3cc35f21e448360ae3f0e63a3be82e44473fcdf15022f0d7536c4",
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" => "7bbbbbf58db496cce04f68d40e3077cf382196e77e1b6a2ad58dd0e32442a828",
117
+ "checksum" => "313affebfe45a3d31a368e39cb3f1ea3860de21282c52ad97c0d194a9dbd52e8",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "6f12971462b0dbd4a4f6d8987a96fd25538e35e0c783b3afbe2317a866073d7a",
121
+ "checksum" => "8f36aea4e175b60627172521ef40eda5f52bc995b52ac2a23b30cf93d59052c4",
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" => "a3f0c1e66e1e37a5f153a6dcb4c8eae63a038d54f838a358eabcd5db5c11b02f",
127
+ "checksum" => "b35d43501b22bf9a98fc37545932fe79c4adee3cea7c4b5a677266a858ceab88",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "a141eaa327e77e3b1b9fb34798aff103f9098b1b4aed20e68e9c505aae645129",
131
+ "checksum" => "ce0d483848b5d44a5a1dfa5f9bc7d9299d9c7c9c5e5a9e1f0b7b5793a01aa349",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "a3f0c1e66e1e37a5f153a6dcb4c8eae63a038d54f838a358eabcd5db5c11b02f",
137
+ "checksum" => "b35d43501b22bf9a98fc37545932fe79c4adee3cea7c4b5a677266a858ceab88",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "a141eaa327e77e3b1b9fb34798aff103f9098b1b4aed20e68e9c505aae645129",
141
+ "checksum" => "ce0d483848b5d44a5a1dfa5f9bc7d9299d9c7c9c5e5a9e1f0b7b5793a01aa349",
142
142
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
143
143
  }
144
144
  }
@@ -838,7 +838,7 @@ static void track_allocation(rb_event_flag_t flag, VALUE arg1, VALUE arg2, ID ar
838
838
  appsignal_track_allocation();
839
839
  }
840
840
 
841
- static VALUE install_allocation_event_hook() {
841
+ static VALUE install_allocation_event_hook(VALUE self) {
842
842
  // This event hook is only available on Ruby 2.1 and 2.2
843
843
  #if defined(RUBY_INTERNAL_EVENT_NEWOBJ)
844
844
  rb_add_event_hook(
@@ -851,7 +851,7 @@ static VALUE install_allocation_event_hook() {
851
851
  return Qnil;
852
852
  }
853
853
 
854
- static VALUE running_in_container() {
854
+ static VALUE running_in_container(VALUE self) {
855
855
  return appsignal_running_in_container() == 1 ? Qtrue : Qfalse;
856
856
  }
857
857
 
@@ -66,6 +66,61 @@ module Appsignal
66
66
  end
67
67
  end
68
68
  end
69
+
70
+ def deduplicate_cron!(events) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity
71
+ # Remove redundant cron check-in events from the given list of events.
72
+ # This is done by removing redundant *pairs* of events -- that is,
73
+ # for each identifier, only send one complete pair of start and
74
+ # finish events. Remove all other complete pairs of start and finish
75
+ # events for that identifier, but keep any other start or finish events
76
+ # that don't have a matching pair.
77
+ #
78
+ # Note that this method assumes that the events in this list have already
79
+ # been rejected based on `Event.redundant?`, so we don't check to remove
80
+ # check-in events that are functionally identical.
81
+ start_digests = Hash.new { |h, k| h[k] = Set.new }
82
+ finish_digests = Hash.new { |h, k| h[k] = Set.new }
83
+ complete_digests = Hash.new { |h, k| h[k] = Set.new }
84
+ keep_digest = {}
85
+
86
+ # Compute a list of complete digests for each identifier, that is, digests
87
+ # for which both a start and finish cron check-in event exist. Store the
88
+ # last seen digest for each identifier as the one to keep.
89
+ events.each do |event|
90
+ if event[:check_in_type] == "cron"
91
+ if event[:kind] == "start"
92
+ start_digests[event[:identifier]] << event[:digest]
93
+ if finish_digests[event[:identifier]].include?(event[:digest])
94
+ complete_digests[event[:identifier]] << event[:digest]
95
+ keep_digest[event[:identifier]] = event[:digest]
96
+ end
97
+ elsif event[:kind] == "finish"
98
+ finish_digests[event[:identifier]] << event[:digest]
99
+ if start_digests[event[:identifier]].include?(event[:digest])
100
+ complete_digests[event[:identifier]] << event[:digest]
101
+ keep_digest[event[:identifier]] = event[:digest]
102
+ end
103
+ end
104
+ end
105
+ end
106
+
107
+ start_digests = nil
108
+ finish_digests = nil
109
+
110
+ events.reject! do |event|
111
+ # Do not remove events that are not cron check-in events or that
112
+ # have an unknown kind.
113
+ return false unless
114
+ event[:check_in_type] == "cron" && (
115
+ event[:kind] == "start" ||
116
+ event[:kind] == "finish")
117
+
118
+ # Remove any event that is part of a complete digest pair, except
119
+ # for the one digest that should be kept.
120
+ keep_digest[event[:identifier]] != event[:digest] &&
121
+ complete_digests[event[:identifier]].include?(event[:digest])
122
+ end
123
+ end
69
124
  end
70
125
  end
71
126
  end
@@ -161,7 +161,9 @@ module Appsignal
161
161
  # Push a copy of the events to the queue, and clear the events array.
162
162
  # This ensures that `@events` always contains events that have not
163
163
  # yet been pushed to the queue.
164
- @queue.push(@events.dup)
164
+ events = @events.dup
165
+ Event.deduplicate_cron!(events)
166
+ @queue.push(events)
165
167
  @events.clear
166
168
 
167
169
  start_waker(BETWEEN_TRANSMISSIONS_DEBOUNCE_SECONDS)
@@ -42,7 +42,16 @@ module Appsignal
42
42
  end
43
43
 
44
44
  module ActiveJobClassInstrumentation
45
- def execute(job)
45
+ def execute(job) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
46
+ enqueued_at = job["enqueued_at"]
47
+ queue_start = Time.parse(enqueued_at) if enqueued_at
48
+ queue_time =
49
+ if queue_start
50
+ time_now = Time.now.utc
51
+ # Calculate queue time and store it as milliseconds
52
+ (time_now - queue_start) * 1_000
53
+ end
54
+
46
55
  job_status = nil
47
56
  has_wrapper_transaction = Appsignal::Transaction.current?
48
57
  transaction =
@@ -73,10 +82,8 @@ module Appsignal
73
82
  raise exception
74
83
  ensure
75
84
  if transaction
76
- enqueued_at = job["enqueued_at"]
77
- if enqueued_at # Present in Rails 6 and up
78
- transaction.set_queue_start((Time.parse(enqueued_at).to_f * 1_000).to_i)
79
- end
85
+ # Present in Rails 6 and up
86
+ transaction.set_queue_start((queue_start.to_f * 1_000).to_i) if queue_start
80
87
 
81
88
  unless has_wrapper_transaction
82
89
  # Only complete transaction if ActiveJob is not wrapped in
@@ -94,6 +101,15 @@ module Appsignal
94
101
  ActiveJobHelpers.increment_counter metric_name, 1,
95
102
  tags.merge(:status => :processed)
96
103
  end
104
+
105
+ queue_name = job["queue_name"]
106
+ if queue_time && queue_name
107
+ ActiveJobHelpers.add_distribution_value(
108
+ "queue_time",
109
+ queue_time,
110
+ :queue => queue_name
111
+ )
112
+ end
97
113
  end
98
114
 
99
115
  private
@@ -172,6 +188,10 @@ module Appsignal
172
188
  def self.increment_counter(key, value, tags = {})
173
189
  Appsignal.increment_counter "active_job_#{key}", value, tags
174
190
  end
191
+
192
+ def self.add_distribution_value(key, value, tags = {})
193
+ Appsignal.add_distribution_value("active_job_#{key}", value, tags)
194
+ end
175
195
  end
176
196
  end
177
197
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "4.5.9"
4
+ VERSION = "4.5.13"
5
5
  end
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: 4.5.9
4
+ version: 4.5.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-04-09 00:00:00.000000000 Z
13
+ date: 2025-05-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: logger