logister-ruby 0.2.3 → 0.2.4

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: fd9ec67090820ac7b825afcbfd87a6a75f26033b0153daf8ee60b44a6d6fbbf3
4
- data.tar.gz: 2175055728eb9dcc9bc9ed0acf4b3640f52900bcd35933fdd92db6ebbc1dfc3a
3
+ metadata.gz: '08b202068c5d0907d8c8d08b3490dfbc34af5863df48c2e7a491a9a4c18e5307'
4
+ data.tar.gz: ba465c7050af6b92e27a36ffd985b9eedbd667ab6be211dd9e1db457e501ff6d
5
5
  SHA512:
6
- metadata.gz: cc1412c538be57e39a12e3f7c6939d1e710aa387490575ddf9af7df8ccda96cae3faafd9256348e18208ce63ebc0922f1696ae6b6d22aaeaf279c2b555960eee
7
- data.tar.gz: 92276f407d774dc3010447cba8b5f0aea0c878ad8d30ba428b46585da3afbdf1dd9f0eb11b6cc62e89afa72e6433292eab19898551c5749a378d11a66aa9e646
6
+ metadata.gz: 55b1680278af20b4779519debd47e7f111348e5132323d07116a02cd7a26b27dd556094e479cdb871f1db64db74dc92b09fc7d52288c982048b9b084fa751b81
7
+ data.tar.gz: f05606399bc43607512dee0c332212f30f7d1d6352dd0c6ba3c6ce39f3fc91fb8fa61b107de1ae045736360dd026afe947cf3e3ef01fef49f353cc2d23e6e4bf
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## v0.2.4 - 2026-05-21
4
+
5
+ - Enriched every Ruby error report with shared runtime, deployment, breadcrumb, and dependency context, including manual `Logister.report_error` calls.
6
+ - Added structured nested exception cause data to Ruby error payloads.
7
+
8
+ ## v0.2.3 - 2026-04-22
9
+
10
+ - Refined the Ruby and Rails client for Logister event delivery.
11
+ - Added richer reporting support for logs, transactions, check-ins, ActiveJob failures, breadcrumbs, and dependency context.
12
+ - Improved package metadata and docs linkage for the canonical Logister docs and self-hosted backend.
13
+ - Documented the gem as the Ruby client for the Logister backend instead of only the hosted `logister.org` service.
data/README.md CHANGED
@@ -1,6 +1,33 @@
1
1
  # logister-ruby
2
2
 
3
- `logister-ruby` sends application errors and custom metrics to `logister.org`.
3
+ `logister-ruby` is the Ruby and Rails client for sending errors, logs, metrics, transactions, and check-ins to Logister.
4
+
5
+ Install it from RubyGems as `logister-ruby`.
6
+
7
+ ## Table Of Contents
8
+
9
+ - [What this gem is for](#what-this-gem-is-for)
10
+ - [Self-hosted backend](#self-hosted-backend)
11
+ - [Install From RubyGems](#install-from-rubygems)
12
+ - [Configuration](#configuration)
13
+ - [Reliability options](#reliability-options)
14
+ - [Filtering and redaction](#filtering-and-redaction)
15
+ - [Rails auto-reporting](#rails-auto-reporting)
16
+ - [Database load metrics (ActiveRecord)](#database-load-metrics-activerecord)
17
+ - [Breadcrumbs and dependencies](#breadcrumbs-and-dependencies)
18
+ - [ActiveJob error context](#activejob-error-context)
19
+ - [Manual reporting](#manual-reporting)
20
+ - [Documentation](#documentation)
21
+ - [Release](#release)
22
+
23
+ ## What this gem is for
24
+
25
+ Use this gem when you want a Ruby or Rails app to send telemetry into the Logister backend.
26
+
27
+ - Main Logister app: https://github.com/taimoorq/logister
28
+ - Ruby integration docs: https://docs.logister.org/integrations/ruby/
29
+ - Product docs: https://docs.logister.org/
30
+ - RubyGems package: https://rubygems.org/gems/logister-ruby
4
31
 
5
32
  ## Self-hosted backend
6
33
 
@@ -8,12 +35,26 @@ Use the open source Logister app repository to self-host the ingestion UI/API ba
8
35
 
9
36
  - App source: https://github.com/taimoorq/logister
10
37
 
11
- ## Install
38
+ ## Install From RubyGems
39
+
40
+ With Bundler in a Rails or Ruby app:
12
41
 
13
42
  ```ruby
14
43
  gem "logister-ruby"
15
44
  ```
16
45
 
46
+ Then install:
47
+
48
+ ```bash
49
+ bundle install
50
+ ```
51
+
52
+ Or install the gem directly from RubyGems:
53
+
54
+ ```bash
55
+ gem install logister-ruby
56
+ ```
57
+
17
58
  Then generate an initializer in Rails:
18
59
 
19
60
  ```bash
@@ -47,6 +88,8 @@ Logister.configure do |config|
47
88
  end
48
89
  ```
49
90
 
91
+ If you are using a self-hosted Logister install, point `config.endpoint` at your own Logister host instead of `logister.org`.
92
+
50
93
  ## Reliability options
51
94
 
52
95
  ```ruby
@@ -76,7 +119,8 @@ end
76
119
  ## Rails auto-reporting
77
120
 
78
121
  If Rails is present, the gem installs middleware that reports unhandled exceptions automatically.
79
- It also attaches richer context (trace IDs, route/response/performance info, breadcrumbs, dependency calls, and user metadata when available).
122
+ It also attaches richer context such as trace IDs, route/response/performance info, breadcrumbs, dependency calls, and user metadata when available.
123
+ Manual `Logister.report_error` calls use the same shared enrichment path, so Ruby apps get runtime, deployment, breadcrumb, dependency, user, and nested exception cause context even when an error is reported outside the Rails middleware.
80
124
 
81
125
  ## Database load metrics (ActiveRecord)
82
126
 
@@ -155,13 +199,23 @@ Logister.report_check_in(
155
199
  )
156
200
  ```
157
201
 
202
+ ## Documentation
203
+
204
+ - Ruby integration docs: https://docs.logister.org/integrations/ruby/
205
+ - Main Logister docs: https://docs.logister.org/
206
+ - [Contributing](CONTRIBUTING.md)
207
+ - [Code of Conduct](CODE_OF_CONDUCT.md)
208
+ - [Security Policy](SECURITY.md)
209
+ - [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md)
210
+
158
211
  ## Release
159
212
 
160
213
  Use Bundler's built-in release flow:
161
214
 
162
215
  ```bash
163
216
  # 1) bump version in lib/logister/version.rb
164
- # 2) commit changes
217
+ # 2) update CHANGELOG.md
218
+ # 3) commit changes
165
219
  bundle exec rake release
166
220
  ```
167
221
 
@@ -3,6 +3,8 @@
3
3
  require 'digest'
4
4
  require 'time'
5
5
  require 'set'
6
+ require_relative 'context_helpers'
7
+ require_relative 'context_store'
6
8
 
7
9
  module Logister
8
10
  class Reporter
@@ -41,7 +43,7 @@ module Logister
41
43
  return false if ignored_exception?(exception)
42
44
  return false if ignored_path?(context)
43
45
 
44
- merged_context = context.dup
46
+ merged_context = default_error_context.merge(context)
45
47
  user = current_user_context
46
48
  merged_context[:user] = user if user
47
49
 
@@ -51,11 +53,7 @@ module Logister
51
53
  message: "#{exception.class}: #{exception.message}",
52
54
  fingerprint: fingerprint || default_fingerprint(exception),
53
55
  context: merged_context.merge(
54
- exception: {
55
- class: exception.class.to_s,
56
- message: exception.message.to_s,
57
- backtrace: Array(exception.backtrace).first(50)
58
- },
56
+ exception: exception_context(exception),
59
57
  tags: tags
60
58
  )
61
59
  )
@@ -185,6 +183,31 @@ module Logister
185
183
  Thread.current[:logister_user]
186
184
  end
187
185
 
186
+ def default_error_context
187
+ Logister::ContextHelpers.compact_deep(
188
+ {
189
+ breadcrumbs: Logister::ContextStore.breadcrumbs.presence,
190
+ dependencyCalls: Logister::ContextStore.dependencies.presence
191
+ }
192
+ .merge(Logister::ContextHelpers.runtime_context)
193
+ .merge(Logister::ContextHelpers.deployment_context)
194
+ )
195
+ rescue StandardError => e
196
+ @configuration.logger.warn("logister default error context failed: #{e.class} #{e.message}")
197
+ {}
198
+ end
199
+
200
+ def exception_context(exception, depth = 0)
201
+ return nil unless exception
202
+
203
+ {
204
+ class: exception.class.to_s,
205
+ message: exception.message.to_s,
206
+ backtrace: Array(exception.backtrace).first(50),
207
+ cause: depth < 5 ? exception_context(exception.cause, depth + 1) : nil
208
+ }.compact
209
+ end
210
+
188
211
  def build_payload(event_type:, level:, message:, fingerprint:, context:)
189
212
  {
190
213
  event_type: event_type,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Logister
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
@@ -6,21 +6,25 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ['Logister']
7
7
  spec.email = ['support@logister.org']
8
8
 
9
- spec.summary = 'Send Rails errors and metrics to logister.org'
10
- spec.description = 'Client gem for reporting errors and custom metrics from Ruby and Rails apps to logister.org'
9
+ spec.summary = 'Ruby and Rails client for sending events to Logister'
10
+ spec.description = 'Ruby and Rails client for reporting errors, logs, metrics, transactions, and check-ins to the Logister backend, including self-hosted installs.'
11
11
  spec.homepage = 'https://github.com/taimoorq/logister-ruby'
12
12
  spec.license = 'MIT'
13
13
  spec.required_ruby_version = '>= 3.1.0'
14
14
 
15
15
  spec.metadata['homepage_uri'] = spec.homepage
16
16
  spec.metadata['source_code_uri'] = 'https://github.com/taimoorq/logister-ruby'
17
+ spec.metadata['documentation_uri'] = 'https://docs.logister.org/integrations/ruby/'
18
+ spec.metadata['changelog_uri'] = 'https://github.com/taimoorq/logister-ruby/blob/main/CHANGELOG.md'
19
+ spec.metadata['bug_tracker_uri'] = 'https://github.com/taimoorq/logister-ruby/issues'
17
20
 
18
21
  spec.files = Dir.chdir(__dir__) do
19
- Dir.glob('lib/**/*') + ['README.md', 'LICENSE', 'logister-ruby.gemspec']
22
+ Dir.glob('lib/**/*') + ['README.md', 'CHANGELOG.md', 'LICENSE', 'logister-ruby.gemspec']
20
23
  end
21
24
 
22
25
  spec.require_paths = ['lib']
23
26
 
24
27
  spec.add_dependency 'activesupport', '>= 6.1'
28
+ spec.add_development_dependency 'actionpack', '>= 6.1'
25
29
  spec.add_development_dependency 'rake', '>= 13.0'
26
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logister-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logister
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '6.1'
26
+ - !ruby/object:Gem::Dependency
27
+ name: actionpack
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '6.1'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '6.1'
26
40
  - !ruby/object:Gem::Dependency
27
41
  name: rake
28
42
  requirement: !ruby/object:Gem::Requirement
@@ -37,14 +51,15 @@ dependencies:
37
51
  - - ">="
38
52
  - !ruby/object:Gem::Version
39
53
  version: '13.0'
40
- description: Client gem for reporting errors and custom metrics from Ruby and Rails
41
- apps to logister.org
54
+ description: Ruby and Rails client for reporting errors, logs, metrics, transactions,
55
+ and check-ins to the Logister backend, including self-hosted installs.
42
56
  email:
43
57
  - support@logister.org
44
58
  executables: []
45
59
  extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
62
+ - CHANGELOG.md
48
63
  - LICENSE
49
64
  - README.md
50
65
  - lib/generators/logister/install_generator.rb
@@ -69,6 +84,9 @@ licenses:
69
84
  metadata:
70
85
  homepage_uri: https://github.com/taimoorq/logister-ruby
71
86
  source_code_uri: https://github.com/taimoorq/logister-ruby
87
+ documentation_uri: https://docs.logister.org/integrations/ruby/
88
+ changelog_uri: https://github.com/taimoorq/logister-ruby/blob/main/CHANGELOG.md
89
+ bug_tracker_uri: https://github.com/taimoorq/logister-ruby/issues
72
90
  rdoc_options: []
73
91
  require_paths:
74
92
  - lib
@@ -83,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
101
  - !ruby/object:Gem::Version
84
102
  version: '0'
85
103
  requirements: []
86
- rubygems_version: 4.0.3
104
+ rubygems_version: 4.0.6
87
105
  specification_version: 4
88
- summary: Send Rails errors and metrics to logister.org
106
+ summary: Ruby and Rails client for sending events to Logister
89
107
  test_files: []