action_reporter 3.2.1 → 3.2.2
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 +11 -0
- data/README.md +15 -2
- data/action_reporter.gemspec +3 -4
- data/lib/action_reporter/current.rb +0 -1
- data/lib/action_reporter/scout_apm_reporter.rb +14 -4
- data/lib/action_reporter/sentry_reporter.rb +9 -1
- data/lib/action_reporter/version.rb +1 -1
- metadata +6 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2b857fcdb2cb3d2a5c295a64ccb2e19d9b8e3d901318470daf4150e763ab719
|
|
4
|
+
data.tar.gz: ef0bff6df6d8c5674f665286c7ebd3835eea4a822133efc63f48745e9ca051cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 419c025a5525b32a6d76654225ae11469dd6b2fda5a6d34325926c4f3e1e5fb05fbca634cd18494fc48c9b1e579955102e5f4ec85161c22ba46f9c9efa84380b
|
|
7
|
+
data.tar.gz: 509c80e97e8f3405da0eda1d118a98bedefe8a7834c24eaca6fdde5a584938f69cc15bd1b6d2f565f2347e7878d2069c8563b379ee962d27eefaac3224610e75
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 3.2.2 (2026-11-07)
|
|
4
|
+
|
|
5
|
+
- Clear Sentry user and transaction identifiers when resetting request context.
|
|
6
|
+
- Delete the Sentry `transaction_id` tag when the setter receives `nil`.
|
|
7
|
+
- Clear ScoutApm user and extra context when resetting request context.
|
|
8
|
+
- Restore ScoutApm extra context after `notify` so per-call context does not linger.
|
|
9
|
+
- Call `ScoutApm::Transaction.ignore!` from `ScoutApmReporter#ignore_transaction!`.
|
|
10
|
+
- Cancel release preparation when confirmation input is closed.
|
|
11
|
+
- Require a CHANGELOG version heading before gem push.
|
|
12
|
+
- Run the test workflow on pull requests with read-only contents permission.
|
|
13
|
+
|
|
3
14
|
## 3.2.1 (2026-07-13)
|
|
4
15
|
|
|
5
16
|
- Fix check-in identifier errors to raise `ActionReporter::Error` instead of stack overflow when an identifier cannot be stringified
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# action_reporter
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/rb/action_reporter) [](https://github.com/amkisko/action_reporter.rb/actions/workflows/test.yml) [](https://app.codecov.io/github/amkisko/action_reporter.rb) [](https://sonarcloud.io/project/overview?id=amkisko_action_reporter.rb)
|
|
4
4
|
|
|
5
5
|
Ruby wrapper for multiple reporting services.
|
|
6
6
|
|
|
@@ -133,7 +133,7 @@ end
|
|
|
133
133
|
```bash
|
|
134
134
|
bundle install
|
|
135
135
|
bundle exec appraisal generate
|
|
136
|
-
bundle exec rspec
|
|
136
|
+
bundle exec polyrun parallel-rspec --workers 5 --merge-failures
|
|
137
137
|
bin/appraisals
|
|
138
138
|
bundle exec standardrb --fix
|
|
139
139
|
```
|
|
@@ -163,6 +163,19 @@ gem push action_reporter-*.gem
|
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
|
|
166
|
+
## Links
|
|
167
|
+
|
|
168
|
+
- [GitHub](https://github.com/amkisko/action_reporter.rb)
|
|
169
|
+
- [GitLab](https://gitlab.com/amkisko/action_reporter.rb)
|
|
170
|
+
- [RubyGems](https://rubygems.org/gems/action_reporter)
|
|
171
|
+
- [Versions Atom](https://rubygems.org/gems/action_reporter/versions.atom) (feed id `5814531496962`)
|
|
172
|
+
- [libraries.io](https://libraries.io/rubygems/action_reporter)
|
|
173
|
+
- [Deps.dev](https://deps.dev/rubygems/action_reporter)
|
|
174
|
+
- [SonarCloud](https://sonarcloud.io/project/overview?id=amkisko_action_reporter.rb)
|
|
175
|
+
- [Snyk](https://snyk.io/test/github/amkisko/action_reporter.rb)
|
|
176
|
+
- [Codecov](https://app.codecov.io/github/amkisko/action_reporter.rb)
|
|
177
|
+
- [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=github.com/amkisko/action_reporter.rb)
|
|
178
|
+
|
|
166
179
|
## License
|
|
167
180
|
|
|
168
181
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/action_reporter.gemspec
CHANGED
|
@@ -28,10 +28,10 @@ Gem::Specification.new do |gem|
|
|
|
28
28
|
# s.bindir = "bin"
|
|
29
29
|
# s.executables = ["action_reporter"]
|
|
30
30
|
|
|
31
|
-
gem.required_ruby_version = ">=
|
|
31
|
+
gem.required_ruby_version = ">= 3.4"
|
|
32
32
|
gem.require_path = "lib"
|
|
33
33
|
|
|
34
|
-
gem.add_runtime_dependency "activesupport", ">=
|
|
34
|
+
gem.add_runtime_dependency "activesupport", ">= 7.0"
|
|
35
35
|
|
|
36
36
|
gem.add_development_dependency "rails", "> 5"
|
|
37
37
|
|
|
@@ -44,9 +44,8 @@ Gem::Specification.new do |gem|
|
|
|
44
44
|
|
|
45
45
|
gem.add_development_dependency "bundler", ">= 2"
|
|
46
46
|
gem.add_development_dependency "rspec", "~> 3"
|
|
47
|
-
gem.add_development_dependency "polyrun", ">= 2.2.
|
|
47
|
+
gem.add_development_dependency "polyrun", ">= 2.2.9"
|
|
48
48
|
gem.add_development_dependency "prosopite", "~> 2.0"
|
|
49
|
-
gem.add_development_dependency "rspec_junit_formatter", "~> 0.6"
|
|
50
49
|
gem.add_development_dependency "webmock", "~> 3"
|
|
51
50
|
gem.add_development_dependency "pry", "~> 0.15"
|
|
52
51
|
gem.add_development_dependency "standard", "~> 1.52"
|
|
@@ -2,10 +2,17 @@ module ActionReporter
|
|
|
2
2
|
class ScoutApmReporter < Base
|
|
3
3
|
class_accessor "ScoutApm::Error"
|
|
4
4
|
class_accessor "ScoutApm::Context"
|
|
5
|
+
class_accessor "ScoutApm::Transaction"
|
|
5
6
|
|
|
6
7
|
def notify(error, context: {})
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
context_object = scoutapm_context_class.current
|
|
9
|
+
previous_extra = context_object.instance_variable_get(:@extra).dup
|
|
10
|
+
begin
|
|
11
|
+
self.context(context)
|
|
12
|
+
scoutapm_error_class.capture(error)
|
|
13
|
+
ensure
|
|
14
|
+
context_object.instance_variable_set(:@extra, previous_extra)
|
|
15
|
+
end
|
|
9
16
|
end
|
|
10
17
|
|
|
11
18
|
def context(args)
|
|
@@ -16,7 +23,10 @@ module ActionReporter
|
|
|
16
23
|
end
|
|
17
24
|
|
|
18
25
|
def reset_context
|
|
19
|
-
|
|
26
|
+
context_object = scoutapm_context_class.current
|
|
27
|
+
# ScoutApm::Context no longer exposes clear!; wipe request-local user and extra hashes.
|
|
28
|
+
context_object.instance_variable_set(:@extra, {})
|
|
29
|
+
context_object.instance_variable_set(:@user, {})
|
|
20
30
|
end
|
|
21
31
|
|
|
22
32
|
def current_remote_addr=(remote_addr)
|
|
@@ -29,7 +39,7 @@ module ActionReporter
|
|
|
29
39
|
end
|
|
30
40
|
|
|
31
41
|
def ignore_transaction!
|
|
32
|
-
|
|
42
|
+
scoutapm_transaction_class.ignore!
|
|
33
43
|
end
|
|
34
44
|
end
|
|
35
45
|
end
|
|
@@ -20,6 +20,10 @@ module ActionReporter
|
|
|
20
20
|
|
|
21
21
|
def reset_context
|
|
22
22
|
apply_reporter_context({})
|
|
23
|
+
scope = sentry_class.get_current_scope
|
|
24
|
+
scope.set_user({})
|
|
25
|
+
scope.tags.delete(:transaction_id)
|
|
26
|
+
scope.set_transaction_name(nil)
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
def current_user=(user)
|
|
@@ -28,7 +32,11 @@ module ActionReporter
|
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
def transaction_id=(transaction_id)
|
|
31
|
-
|
|
35
|
+
if transaction_id.nil?
|
|
36
|
+
sentry_class.get_current_scope.tags.delete(:transaction_id)
|
|
37
|
+
else
|
|
38
|
+
sentry_class.set_tags(transaction_id: transaction_id)
|
|
39
|
+
end
|
|
32
40
|
end
|
|
33
41
|
|
|
34
42
|
def transaction_name=(transaction_name)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: action_reporter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrei Makarov
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
18
|
+
version: '7.0'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '
|
|
25
|
+
version: '7.0'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rails
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -155,14 +155,14 @@ dependencies:
|
|
|
155
155
|
requirements:
|
|
156
156
|
- - ">="
|
|
157
157
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: 2.2.
|
|
158
|
+
version: 2.2.9
|
|
159
159
|
type: :development
|
|
160
160
|
prerelease: false
|
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements:
|
|
163
163
|
- - ">="
|
|
164
164
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: 2.2.
|
|
165
|
+
version: 2.2.9
|
|
166
166
|
- !ruby/object:Gem::Dependency
|
|
167
167
|
name: prosopite
|
|
168
168
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -177,20 +177,6 @@ dependencies:
|
|
|
177
177
|
- - "~>"
|
|
178
178
|
- !ruby/object:Gem::Version
|
|
179
179
|
version: '2.0'
|
|
180
|
-
- !ruby/object:Gem::Dependency
|
|
181
|
-
name: rspec_junit_formatter
|
|
182
|
-
requirement: !ruby/object:Gem::Requirement
|
|
183
|
-
requirements:
|
|
184
|
-
- - "~>"
|
|
185
|
-
- !ruby/object:Gem::Version
|
|
186
|
-
version: '0.6'
|
|
187
|
-
type: :development
|
|
188
|
-
prerelease: false
|
|
189
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
190
|
-
requirements:
|
|
191
|
-
- - "~>"
|
|
192
|
-
- !ruby/object:Gem::Version
|
|
193
|
-
version: '0.6'
|
|
194
180
|
- !ruby/object:Gem::Dependency
|
|
195
181
|
name: webmock
|
|
196
182
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -401,7 +387,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
401
387
|
requirements:
|
|
402
388
|
- - ">="
|
|
403
389
|
- !ruby/object:Gem::Version
|
|
404
|
-
version:
|
|
390
|
+
version: '3.4'
|
|
405
391
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
406
392
|
requirements:
|
|
407
393
|
- - ">="
|