sentry-good_job 7.0.3 → 7.1.0
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 +7 -0
- data/README.md +6 -2
- data/lib/sentry/good_job/configuration.rb +3 -1
- data/lib/sentry/good_job/context_helpers.rb +29 -14
- data/lib/sentry/good_job/version.rb +1 -1
- data/sentry-good_job.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c4630b57440e5c5d1b74cfb3a55653bf3387a3f1fa63bc601a04ecf8c18947f
|
|
4
|
+
data.tar.gz: 7d5404b723683d1d453dba9ba6cc212accdda09b0203dfcd36cbea30751b5fd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66d73ac554cdefe5f71cc86f46b2ce4b937d8d7aac7a680493f1cf9c2de620742598f8cb10f32ea005433c2ee35c05f6a84f7a85f32a0dab825ee751eda53c4c
|
|
7
|
+
data.tar.gz: 233f0b966f0fbe3613e61a5d98f664a12ca34320a0bb89a51d58080aad10f33f1479cd2f68270a401587ae11e5b1e3709eaaf6a4c146f1e2086467ac8c92bf8d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 7.1.0 (2026-11-06)
|
|
4
|
+
|
|
5
|
+
- Add `labels` and legacy `concurrency_key` to `good_job` error context when present
|
|
6
|
+
- Exclude Good Job concurrency and throttle exceeded errors from reporting by default
|
|
7
|
+
- Allow `good_job` 5.x (`>= 3.0`, `< 6.0`)
|
|
8
|
+
|
|
3
9
|
## 7.0.3 (2026-11-03)
|
|
4
10
|
|
|
5
11
|
- Remove unwired `ActiveJobExtensions.enhance_sentry_tags` (no sentry-rails tags hook)
|
|
@@ -7,6 +13,7 @@
|
|
|
7
13
|
- Drop the futile `skippable_job_adapters` example that never asserted production behavior
|
|
8
14
|
- Simplify `_sentry_set_span_data` by removing an unreachable `super` branch after Concern include on `ActiveJob::Base`
|
|
9
15
|
- Add `sqlite3` to the root Gemfile so `spec/integration` runs under the default bundle
|
|
16
|
+
- Sync appraisal lockfiles after the path-gem version bump; run `appraisal install` in release
|
|
10
17
|
|
|
11
18
|
## 7.0.2 (2026-10-30)
|
|
12
19
|
|
data/README.md
CHANGED
|
@@ -161,7 +161,7 @@ When performance monitoring is enabled:
|
|
|
161
161
|
- Job execution time (sentry-rails / Sentry spans)
|
|
162
162
|
- Queue latency on this gem's enqueue-span fallback (skipped when sentry-rails `record_producer_span` is present)
|
|
163
163
|
- Retry counts
|
|
164
|
-
- Good Job context fields: queue name, executions, priority
|
|
164
|
+
- Good Job context fields: queue name, executions, priority, labels, concurrency key (legacy)
|
|
165
165
|
|
|
166
166
|
## Error Context
|
|
167
167
|
|
|
@@ -169,12 +169,16 @@ Merged into error reports:
|
|
|
169
169
|
|
|
170
170
|
- Job class name, job ID, locale, scheduled_at (sentry-rails)
|
|
171
171
|
- Queue name, execution count, priority, enqueued_at (this gem under `good_job`)
|
|
172
|
+
- Labels when the job responds to `good_job_labels` (Good Job v5 concurrency identity)
|
|
173
|
+
- Concurrency key when present on older Good Job 4.x jobs
|
|
172
174
|
- Job arguments when `config.data_collection.queues` is enabled
|
|
173
175
|
|
|
176
|
+
Concurrency and throttle exceeded errors are excluded by default (`IGNORE_DEFAULT`).
|
|
177
|
+
|
|
174
178
|
## Compatibility
|
|
175
179
|
|
|
176
180
|
- Ruby 3.4+
|
|
177
|
-
- Good Job 3.x and
|
|
181
|
+
- Good Job 3.x, 4.x, and 5.x
|
|
178
182
|
- Sentry Ruby SDK 7.x
|
|
179
183
|
|
|
180
184
|
## Contributing
|
|
@@ -13,7 +13,9 @@ module Sentry
|
|
|
13
13
|
module GoodJob
|
|
14
14
|
IGNORE_DEFAULT = [
|
|
15
15
|
"ActiveJob::DeserializationError",
|
|
16
|
-
"ActiveJob::SerializationError"
|
|
16
|
+
"ActiveJob::SerializationError",
|
|
17
|
+
"GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError",
|
|
18
|
+
"GoodJob::ActiveJobExtensions::Concurrency::ThrottleExceededError"
|
|
17
19
|
]
|
|
18
20
|
|
|
19
21
|
class Configuration
|
|
@@ -9,21 +9,20 @@ module Sentry
|
|
|
9
9
|
def self.add_context(job, base_context = {})
|
|
10
10
|
return base_context unless job.respond_to?(:queue_name) && job.respond_to?(:executions)
|
|
11
11
|
|
|
12
|
-
good_job_context = {
|
|
13
|
-
queue_name: job.queue_name,
|
|
14
|
-
executions: job.executions,
|
|
15
|
-
enqueued_at: job.enqueued_at,
|
|
16
|
-
priority: job.respond_to?(:priority) ? job.priority : nil
|
|
17
|
-
}
|
|
18
|
-
|
|
19
12
|
# Job arguments stay on sentry-rails via config.data_collection.queues
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
base_context.merge(
|
|
14
|
+
good_job: {
|
|
15
|
+
queue_name: job.queue_name,
|
|
16
|
+
executions: job.executions,
|
|
17
|
+
enqueued_at: job.enqueued_at,
|
|
18
|
+
priority: job.respond_to?(:priority) ? job.priority : nil
|
|
19
|
+
}.merge(optional_good_job_fields(job))
|
|
20
|
+
)
|
|
23
21
|
end
|
|
24
22
|
|
|
25
23
|
# Manual helper for hosts that set Sentry tags themselves.
|
|
26
24
|
# Setup does not call this; sentry-rails has no tags enhancement hook.
|
|
25
|
+
# Prefer labels in context: dynamic labels can be high-cardinality as tags.
|
|
27
26
|
def self.add_tags(job, base_tags = {})
|
|
28
27
|
return base_tags unless job.respond_to?(:queue_name) && job.respond_to?(:executions)
|
|
29
28
|
|
|
@@ -31,13 +30,29 @@ module Sentry
|
|
|
31
30
|
queue_name: job.queue_name,
|
|
32
31
|
executions: job.executions
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
end
|
|
33
|
+
good_job_tags[:priority] = job.priority if job.respond_to?(:priority)
|
|
34
|
+
concurrency_key = concurrency_key_for(job)
|
|
35
|
+
good_job_tags[:concurrency_key] = concurrency_key if concurrency_key
|
|
38
36
|
|
|
39
37
|
base_tags.merge(good_job_tags)
|
|
40
38
|
end
|
|
39
|
+
|
|
40
|
+
def self.optional_good_job_fields(job)
|
|
41
|
+
fields = {}
|
|
42
|
+
fields[:labels] = Array(job.good_job_labels) if job.respond_to?(:good_job_labels)
|
|
43
|
+
# Legacy through good_job 4.x; removed with the concurrency_key column in v5.
|
|
44
|
+
concurrency_key = concurrency_key_for(job)
|
|
45
|
+
fields[:concurrency_key] = concurrency_key if concurrency_key
|
|
46
|
+
fields
|
|
47
|
+
end
|
|
48
|
+
private_class_method :optional_good_job_fields
|
|
49
|
+
|
|
50
|
+
def self.concurrency_key_for(job)
|
|
51
|
+
return unless job.respond_to?(:good_job_concurrency_key)
|
|
52
|
+
|
|
53
|
+
job.good_job_concurrency_key
|
|
54
|
+
end
|
|
55
|
+
private_class_method :concurrency_key_for
|
|
41
56
|
end
|
|
42
57
|
end
|
|
43
58
|
end
|
data/sentry-good_job.gemspec
CHANGED
|
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
|
|
|
43
43
|
spec.require_paths = ["lib"]
|
|
44
44
|
|
|
45
45
|
spec.add_dependency "sentry-ruby", ">= 7.0", "< 8.0"
|
|
46
|
-
spec.add_dependency "good_job", ">= 3.0", "<
|
|
46
|
+
spec.add_dependency "good_job", ">= 3.0", "< 6.0"
|
|
47
47
|
|
|
48
48
|
spec.add_development_dependency "appraisal", "~> 2"
|
|
49
49
|
spec.add_development_dependency "bundler", ">= 2"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sentry-good_job
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.0
|
|
4
|
+
version: 7.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sentry Team
|
|
@@ -39,7 +39,7 @@ dependencies:
|
|
|
39
39
|
version: '3.0'
|
|
40
40
|
- - "<"
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
|
-
version: '
|
|
42
|
+
version: '6.0'
|
|
43
43
|
type: :runtime
|
|
44
44
|
prerelease: false
|
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -49,7 +49,7 @@ dependencies:
|
|
|
49
49
|
version: '3.0'
|
|
50
50
|
- - "<"
|
|
51
51
|
- !ruby/object:Gem::Version
|
|
52
|
-
version: '
|
|
52
|
+
version: '6.0'
|
|
53
53
|
- !ruby/object:Gem::Dependency
|
|
54
54
|
name: appraisal
|
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -239,7 +239,7 @@ metadata:
|
|
|
239
239
|
source_code_uri: https://github.com/amkisko/sentry-good_job/tree/main
|
|
240
240
|
changelog_uri: https://github.com/amkisko/sentry-good_job/blob/main/CHANGELOG.md
|
|
241
241
|
bug_tracker_uri: https://github.com/amkisko/sentry-good_job/issues
|
|
242
|
-
documentation_uri: http://www.rubydoc.info/gems/sentry-good_job/7.0
|
|
242
|
+
documentation_uri: http://www.rubydoc.info/gems/sentry-good_job/7.1.0
|
|
243
243
|
rdoc_options: []
|
|
244
244
|
require_paths:
|
|
245
245
|
- lib
|