brainzlab 0.1.0 → 0.1.1

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: dea1ca28ddfd1614e67dd24d5a8cb36663e4cf3b75d00dabfa9ff9e01d95e2cc
4
- data.tar.gz: 753cf41c654d57476fdcd915e1bc088c0fe9a2242cf4464431b520c375012884
3
+ metadata.gz: a23ea95f03ef25ac3386a0fbf07ea352a01440afc23ec340625f9932bc1cf6a6
4
+ data.tar.gz: c6f73bc4d7c99a1c4eae51dd34a525e8e3d48b4d0ad4a5502a96baf931f5e44a
5
5
  SHA512:
6
- metadata.gz: 91382c001767b6f0ca913cb5e12956d7a3664d0a098c94540948796d89db44e6b08c12a5fa9bdf8666c5909822d97bfda68638aaf20de945614a0ee329ed20e5
7
- data.tar.gz: ec17f7bf47291eb1cb00f0173972e866f61634d21d4608e432f7412c866273abb975cd6e9e32a50022377129c489f6819edd21fcbed3d6de6e753113fb79cd0d
6
+ metadata.gz: abf6406497997a9de152038c1f7764ba66165681091ce9f2c91fe3414097beb2599976bcd0ffb0f5bd175cf2fc8d1909a8931cd50794f7a049569a6fa3914140
7
+ data.tar.gz: 5dde805af2709726635c798aec9029dff143ffd63ca1de0166328d7ab68c892ab507a02b9127e6d1af3abd89d18774cf4f4d197dfd7656ae474d493821a54433
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.1] - 2025-12-23
6
+
7
+ ### Fixed
8
+
9
+ - **Reflex** - Improved backtrace parsing
10
+ - Handle different Ruby backtrace formats (backtick+quote and single quotes)
11
+ - Parse backtrace lines without method names
12
+ - Better `in_app` frame detection for absolute paths
13
+
5
14
  ## [0.1.0] - 2025-01-01
6
15
 
7
16
  ### Added
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # BrainzLab Ruby SDK
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/brainzlab.svg)](https://rubygems.org/gems/brainzlab)
4
+ [![CI](https://github.com/brainz-lab/brainzlab-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/brainz-lab/brainzlab-ruby/actions/workflows/ci.yml)
5
+ [![License](https://img.shields.io/badge/license-Ossassy-blue.svg)](LICENSE)
6
+
3
7
  Official Ruby SDK for [BrainzLab](https://brainzlab.ai) - the complete observability platform.
4
8
 
5
9
  - **Recall** - Structured logging
@@ -8,6 +12,8 @@ Official Ruby SDK for [BrainzLab](https://brainzlab.ai) - the complete observabi
8
12
 
9
13
  ## Installation
10
14
 
15
+ ### From RubyGems (recommended)
16
+
11
17
  Add to your Gemfile:
12
18
 
13
19
  ```ruby
@@ -20,6 +26,22 @@ Then run:
20
26
  bundle install
21
27
  ```
22
28
 
29
+ ### From GitHub Packages
30
+
31
+ Add the GitHub Packages source to your Gemfile:
32
+
33
+ ```ruby
34
+ source "https://rubygems.pkg.github.com/brainz-lab" do
35
+ gem 'brainzlab'
36
+ end
37
+ ```
38
+
39
+ Configure Bundler with your GitHub token:
40
+
41
+ ```bash
42
+ bundle config set --global rubygems.pkg.github.com USERNAME:TOKEN
43
+ ```
44
+
23
45
  ## Quick Start
24
46
 
25
47
  ### Configuration
@@ -241,16 +241,27 @@ module BrainzLab
241
241
  end
242
242
 
243
243
  def parse_backtrace_line(line)
244
- # Parse "path/to/file.rb:42:in `method_name'"
245
- if line =~ /\A(.+):(\d+):in `(.+)'\z/
244
+ # Parse various Ruby backtrace formats:
245
+ # - "path/to/file.rb:42:in `method_name'" (backtick + single quote)
246
+ # - "path/to/file.rb:42:in 'method_name'" (single quotes)
247
+ # - "path/to/file.rb:42" (no method)
248
+ if line =~ /\A(.+):(\d+):in [`'](.+)'?\z/
246
249
  {
247
250
  file: $1,
248
251
  line: $2.to_i,
249
252
  function: $3,
250
253
  in_app: in_app_frame?($1)
251
254
  }
255
+ elsif line =~ /\A(.+):(\d+)\z/
256
+ {
257
+ file: $1,
258
+ line: $2.to_i,
259
+ function: nil,
260
+ in_app: in_app_frame?($1)
261
+ }
252
262
  else
253
- { raw: line }
263
+ # Still store file for display even if format is unexpected
264
+ { file: line, line: nil, function: nil, in_app: false }
254
265
  end
255
266
  end
256
267
 
@@ -258,8 +269,12 @@ module BrainzLab
258
269
  return false if path.nil?
259
270
  return false if path.include?("vendor/")
260
271
  return false if path.include?("/gems/")
272
+ return false if path.include?("/ruby/")
261
273
 
262
- path.start_with?("app/", "lib/", "./app/", "./lib/")
274
+ # Match both relative and absolute paths containing app/ or lib/
275
+ path.start_with?("app/", "lib/", "./app/", "./lib/") ||
276
+ path.include?("/app/") ||
277
+ path.include?("/lib/")
263
278
  end
264
279
 
265
280
  def filter_params(params)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrainzLab
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainzlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brainz Lab
@@ -138,6 +138,7 @@ metadata:
138
138
  changelog_uri: https://github.com/brainz-lab/brainzlab-ruby/blob/main/CHANGELOG.md
139
139
  documentation_uri: https://docs.brainzlab.ai/sdk/ruby
140
140
  rubygems_mfa_required: 'true'
141
+ github_repo: ssh://github.com/brainz-lab/brainzlab-ruby
141
142
  rdoc_options: []
142
143
  require_paths:
143
144
  - lib
@@ -145,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
146
  requirements:
146
147
  - - ">="
147
148
  - !ruby/object:Gem::Version
148
- version: 3.1.0
149
+ version: 3.2.0
149
150
  required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  requirements:
151
152
  - - ">="