errorgap 0.1.0 → 0.2.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 +31 -0
- data/README.md +4 -0
- data/lib/errorgap/configuration.rb +6 -0
- data/lib/errorgap/notifier.rb +2 -0
- data/lib/errorgap/transacter.rb +1 -0
- data/lib/errorgap/version.rb +1 -1
- data/lib/generators/errorgap/install_generator.rb +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e386d7d085d300b5364be4f27918288b5b62509895afe19ed525afee51c3f92a
|
|
4
|
+
data.tar.gz: 158ae2443f061e6ff63487dd0f4fe061a54ea4ba7933d65305743d42f84fcb1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f43d61f09d546dc69c6a837e2ae7fee478589f510990e2740119f1945236b179feac4364c70e73459da787e4110757398cb876e44976d4709085cd8303887f96
|
|
7
|
+
data.tar.gz: a20b31f480acfe98543fb8a79d79b1d14427461a9b08d5847249dfa88b67633bcecac0af213d089b1d383d85032ef2f1cb7bb7de51befc108f5cffd1fa9e9c8a
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.0] - 2026-07-10
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `config.ignore_environments` configuration option to skip all reporting
|
|
13
|
+
(error notices and APM transactions) in the listed environments, e.g.
|
|
14
|
+
`config.ignore_environments = %w[test development]`. Also configurable via
|
|
15
|
+
the `ERRORGAP_IGNORE_ENVIRONMENTS` environment variable (comma-separated).
|
|
16
|
+
- `Errorgap::Configuration#ignored_environment?` helper.
|
|
17
|
+
- The Rails install generator initializer now includes `ignore_environments`
|
|
18
|
+
with `test` and `development` ignored by default.
|
|
19
|
+
|
|
20
|
+
## [0.1.0] - 2026-07-09
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Initial release: exception capture with normalized backtraces, manual
|
|
25
|
+
`Errorgap.notify`, Rack middleware, Rails Railtie and install generator.
|
|
26
|
+
- APM performance monitoring (opt-in via `config.apm_enabled`) with request
|
|
27
|
+
timing and DB query spans, sampled by `config.apm_sample_rate`.
|
|
28
|
+
- Authentication via the `X-Errorgap-Project-Key` header.
|
|
29
|
+
|
|
30
|
+
[0.2.0]: https://github.com/errorgaphq/errorgap-ruby/compare/v0.1.0...v0.2.0
|
|
31
|
+
[0.1.0]: https://github.com/errorgaphq/errorgap-ruby/releases/tag/v0.1.0
|
data/README.md
CHANGED
|
@@ -27,6 +27,10 @@ Errorgap.configure do |config|
|
|
|
27
27
|
config.project_id = ENV["ERRORGAP_PROJECT_ID"]
|
|
28
28
|
config.api_key = ENV["ERRORGAP_API_KEY"]
|
|
29
29
|
config.environment = ENV.fetch("RAILS_ENV", ENV.fetch("RACK_ENV", "development"))
|
|
30
|
+
|
|
31
|
+
# Skip reporting entirely (errors and APM) in these environments.
|
|
32
|
+
# Also configurable via ERRORGAP_IGNORE_ENVIRONMENTS="test,development".
|
|
33
|
+
config.ignore_environments = %w[test development]
|
|
30
34
|
end
|
|
31
35
|
```
|
|
32
36
|
|
|
@@ -11,6 +11,7 @@ module Errorgap
|
|
|
11
11
|
:async,
|
|
12
12
|
:logger,
|
|
13
13
|
:filter_keys,
|
|
14
|
+
:ignore_environments,
|
|
14
15
|
:apm_enabled,
|
|
15
16
|
:apm_sample_rate
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ module Errorgap
|
|
|
23
24
|
@root_directory = Dir.pwd
|
|
24
25
|
@async = true
|
|
25
26
|
@filter_keys = %w[password password_confirmation token secret api_key authorization cookie]
|
|
27
|
+
@ignore_environments = ENV.fetch("ERRORGAP_IGNORE_ENVIRONMENTS", "").split(",").map(&:strip).reject(&:empty?)
|
|
26
28
|
@apm_enabled = false
|
|
27
29
|
@apm_sample_rate = 1.0
|
|
28
30
|
end
|
|
@@ -33,6 +35,10 @@ module Errorgap
|
|
|
33
35
|
true
|
|
34
36
|
end
|
|
35
37
|
|
|
38
|
+
def ignored_environment?
|
|
39
|
+
Array(ignore_environments).map(&:to_s).include?(environment.to_s)
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
private
|
|
37
43
|
|
|
38
44
|
def blank?(value)
|
data/lib/errorgap/notifier.rb
CHANGED
|
@@ -22,6 +22,8 @@ module Errorgap
|
|
|
22
22
|
|
|
23
23
|
def notify(error, context: {}, environment: {}, session: {}, params: {}, sync: false)
|
|
24
24
|
@configuration.validate!
|
|
25
|
+
return Response.new(status: 202, body: "ignored environment") if @configuration.ignored_environment?
|
|
26
|
+
|
|
25
27
|
notice = Notice.from_exception(
|
|
26
28
|
error,
|
|
27
29
|
configuration: @configuration,
|
data/lib/errorgap/transacter.rb
CHANGED
data/lib/errorgap/version.rb
CHANGED
|
@@ -17,6 +17,9 @@ module Errorgap
|
|
|
17
17
|
config.root_directory = Rails.root.to_s
|
|
18
18
|
config.logger = Rails.logger
|
|
19
19
|
|
|
20
|
+
# Environments in which nothing is reported (errors or APM).
|
|
21
|
+
config.ignore_environments = %w[test development]
|
|
22
|
+
|
|
20
23
|
# Enable APM performance monitoring (opt-in).
|
|
21
24
|
# Records HTTP request timing and DB query spans via ActiveSupport::Notifications.
|
|
22
25
|
# config.apm_enabled = true
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: errorgap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Errorgap
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -46,6 +46,7 @@ executables:
|
|
|
46
46
|
extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
|
48
48
|
files:
|
|
49
|
+
- CHANGELOG.md
|
|
49
50
|
- LICENSE.txt
|
|
50
51
|
- README.md
|
|
51
52
|
- exe/errorgap
|
|
@@ -66,6 +67,7 @@ licenses:
|
|
|
66
67
|
metadata:
|
|
67
68
|
homepage_uri: https://github.com/errorgaphq/errorgap-ruby
|
|
68
69
|
source_code_uri: https://github.com/errorgaphq/errorgap-ruby
|
|
70
|
+
changelog_uri: https://github.com/errorgaphq/errorgap-ruby/blob/main/CHANGELOG.md
|
|
69
71
|
post_install_message:
|
|
70
72
|
rdoc_options: []
|
|
71
73
|
require_paths:
|