appsignal 4.5.9-java → 4.5.10-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: afba726364437c4a0c03e26e709467a9270fad67cca30667d58980c9b54cd39e
4
- data.tar.gz: 33edb8be5942b17f3b503e56bebd3bb7e981a0d8959119641c84540d696ea06f
3
+ metadata.gz: 95e8aacf7141e9d5c298ecfcb55530ddab73c830c06dbd94ef78090be8c82987
4
+ data.tar.gz: 23c78bd69fa935df895c98f731cc2b3f12b55c47dc4f7027f953b3d2725103e6
5
5
  SHA512:
6
- metadata.gz: 87c13de92021f0a075fffe3402cb358a2ef9998401bc25af5bee2c2a7bab6f3b7925899848951d3f87dca14071a18ab4673cca96d872c357c165cbb273a5e09d
7
- data.tar.gz: fd964bc1242b0dbade63d7c10dd00f7e2e7cad4b000c1acf8134ed8f9b17a69bd0205456f9bc18a353874112b34bdd216ed6024bae5b186d59ef38a0bf1e507c
6
+ metadata.gz: 8cd4da05e0b0f2c71bb3119a6a5e1746e51a6234af8c73923a73432c4cc48139039c2796264f83bcbd736bb5b12236f68bb7d76d65e136fb5ae644114b2877d2
7
+ data.tar.gz: 0a4594b5f101b790ef24cb66b9badd736a3ed8fd2b5ae49b2d12448fd6390d86ee61979d741cb0f1a92850c3445adf4eedadf925d15360c070f7be02031ffeee
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 4.5.10
4
+
5
+ _Published on 2025-05-05._
6
+
7
+ ### Changed
8
+
9
+ - 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))
10
+
3
11
  ## 4.5.9
4
12
 
5
13
  _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"
@@ -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)
@@ -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.10"
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.10
5
5
  platform: java
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-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: logger
@@ -331,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
331
  - !ruby/object:Gem::Version
332
332
  version: '0'
333
333
  requirements: []
334
- rubygems_version: 3.5.23
334
+ rubygems_version: 3.3.7
335
335
  signing_key:
336
336
  specification_version: 4
337
337
  summary: Logs performance and exception data from your app to appsignal.com