lapsoss 0.4.4 → 0.4.5

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: 3c9422cb2f9fa0e1ae582a771fd337d61177d9236db6cd3dfc96edf3fefc7777
4
- data.tar.gz: d1dc595b8fcd5e00feb9f01087e77700bb49452a6b358a309ce630d6b29bd203
3
+ metadata.gz: 5db26196bdbf6e69d90c126041f7310681e240ef22e61f0a3aee12035f7616da
4
+ data.tar.gz: 93a2c75b6af04e776aca9c24f3704ddba51b4a2432d5d6db0f736874bef17c69
5
5
  SHA512:
6
- metadata.gz: 218bbe054b15df5457996cfda82aa6227477446dc0a5be24680acbae4c4ff3edfaf7217adfc96814aba94fe09331300253f4a499a85055b2fbac8df83a8336fb
7
- data.tar.gz: d5b0f10802bfe6c938cf90e8a322b0bc940b11d3bca9fde5efcaf96964c5753c09e04ae453087844cb455056b2cd6fd242e846e99ce59270d25962367daa7bda
6
+ metadata.gz: 38d9d2d1c1e2f67997b71cae8776b2c7ef8b3aca5d13d563080304c63b84b1db227eb923618b1ae078223cfc20dfebf5d1620dcf01eed92ee62d53461bf36e1e
7
+ data.tar.gz: 1831cda3198ad594c850fd5579fed77aa9097ee4f497dd81374bb265ee237addc4d31fab0447d6164cff6fb64695869eba42366e0820647725d0725566158ff8
data/README.md CHANGED
@@ -163,7 +163,7 @@ All adapters are pure Ruby implementations with no external SDK dependencies:
163
163
  - **Rollbar** - Complete error tracking with grouping
164
164
  - **AppSignal** - Error tracking and deploy markers
165
165
  - **Insight Hub** (formerly Bugsnag) - Error tracking with breadcrumbs
166
- - **Telebug** - Sentry-compatible protocol (perfect for self-hosted alternatives)
166
+ - **Telebugs** - Sentry-compatible protocol (perfect for self-hosted alternatives)
167
167
 
168
168
  ## Configuration
169
169
 
@@ -190,9 +190,9 @@ end
190
190
  ### Using Sentry-Compatible Services
191
191
 
192
192
  ```ruby
193
- # Telebug, Glitchtip, or any Sentry-compatible service
193
+ # Telebugs, Glitchtip, or any Sentry-compatible service
194
194
  Lapsoss.configure do |config|
195
- config.use_telebug(dsn: ENV['TELEBUG_DSN'])
195
+ config.use_telebugs(dsn: ENV['TELEBUGS_DSN'])
196
196
  # Or use use_sentry with a custom endpoint
197
197
  config.use_sentry(dsn: ENV['SELF_HOSTED_SENTRY_DSN'])
198
198
  end
@@ -437,8 +437,8 @@ Lapsoss::Registry.register(:my_service, MyAdapter)
437
437
  For Sentry-compatible services, just extend the SentryAdapter:
438
438
 
439
439
  ```ruby
440
- class TelebugAdapter < Lapsoss::Adapters::SentryAdapter
441
- def initialize(name = :telebug, settings = {})
440
+ class TelebugsAdapter < Lapsoss::Adapters::SentryAdapter
441
+ def initialize(name = :telebugs, settings = {})
442
442
  super(name, settings)
443
443
  end
444
444
 
@@ -446,7 +446,7 @@ class TelebugAdapter < Lapsoss::Adapters::SentryAdapter
446
446
 
447
447
  def build_headers(public_key)
448
448
  super(public_key).merge(
449
- "X-Telebug-Client" => "lapsoss/#{Lapsoss::VERSION}"
449
+ "X-Telebugs-Client" => "lapsoss/#{Lapsoss::VERSION}"
450
450
  )
451
451
  end
452
452
  end
@@ -4,16 +4,16 @@ require_relative "sentry_adapter"
4
4
 
5
5
  module Lapsoss
6
6
  module Adapters
7
- # Telebug adapter - uses Sentry protocol with Telebug endpoints
8
- # Telebug is compatible with Sentry's API, so we inherit from SentryAdapter
9
- class TelebugAdapter < SentryAdapter
10
- def initialize(name = :telebug, settings = {})
7
+ # Telebugs adapter - uses Sentry protocol with Telebugs endpoints
8
+ # Telebugs is compatible with Sentry's API, so we inherit from SentryAdapter
9
+ class TelebugsAdapter < SentryAdapter
10
+ def initialize(name = :telebugs, settings = {})
11
11
  super(name, settings)
12
12
  end
13
13
 
14
14
  private
15
15
 
16
- # Override to parse Telebug DSN format
16
+ # Override to parse Telebugs DSN format
17
17
  def parse_dsn(dsn_string)
18
18
  uri = URI.parse(dsn_string)
19
19
  {
@@ -24,15 +24,20 @@ module Lapsoss
24
24
  }
25
25
  end
26
26
 
27
- # Override to build Telebug-specific API path
27
+ # Override to build Telebugs-specific API path
28
28
  def build_api_path(uri)
29
- # Telebug uses: https://[key]@[host]/api/v1/sentry_errors/[project_id]
30
- # The path is already complete: /api/v1/sentry_errors/4
31
- # Unlike Sentry which needs /api/[project_id]/envelope/
32
- uri.path
29
+ # Telebugs DSN: https://[key]@[host]/api/v1/sentry_errors/[project_id]
30
+ # But needs to hit: /api/v1/sentry_errors/api/[project_id]/envelope/
31
+ # Extract base path without project_id
32
+ path_parts = uri.path.split("/")
33
+ project_id = path_parts.last
34
+ base_path = path_parts[0..-2].join("/")
35
+
36
+ # Build the envelope path
37
+ "#{base_path}/api/#{project_id}/envelope/"
33
38
  end
34
39
 
35
- # Override to setup Telebug endpoint
40
+ # Override to setup Telebugs endpoint
36
41
  def setup_endpoint
37
42
  uri = URI.parse(@settings[:dsn])
38
43
  # For Telebug, we use the full URL without port (unless non-standard)
@@ -41,18 +46,13 @@ module Lapsoss
41
46
  self.class.api_path = build_api_path(uri)
42
47
  end
43
48
 
44
- # Override headers builder to add Telebug-specific headers
49
+ # Override headers builder to add Telebugs-specific headers
45
50
  def headers_for(envelope)
46
51
  base_headers = super(envelope)
47
52
  base_headers.merge(
48
- "X-Telebug-Client" => "lapsoss/#{Lapsoss::VERSION}"
53
+ "X-Telebugs-Client" => "lapsoss/#{Lapsoss::VERSION}"
49
54
  )
50
55
  end
51
-
52
- # Override user agent for Telebug
53
- def user_agent
54
- "lapsoss-telebug/#{Lapsoss::VERSION}"
55
- end
56
56
  end
57
57
  end
58
58
  end
@@ -85,9 +85,9 @@ module Lapsoss
85
85
  register_adapter(name, :sentry, **settings)
86
86
  end
87
87
 
88
- # Convenience method for Telebug (Sentry-compatible)
89
- def use_telebug(name: :telebug, **settings)
90
- register_adapter(name, :telebug, **settings)
88
+ # Convenience method for Telebugs (Sentry-compatible)
89
+ def use_telebugs(name: :telebugs, **settings)
90
+ register_adapter(name, :telebugs, **settings)
91
91
  end
92
92
 
93
93
  # Convenience method for AppSignal
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lapsoss
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lapsoss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
@@ -225,7 +225,7 @@ files:
225
225
  - lib/lapsoss/adapters/logger_adapter.rb
226
226
  - lib/lapsoss/adapters/rollbar_adapter.rb
227
227
  - lib/lapsoss/adapters/sentry_adapter.rb
228
- - lib/lapsoss/adapters/telebug_adapter.rb
228
+ - lib/lapsoss/adapters/telebugs_adapter.rb
229
229
  - lib/lapsoss/backtrace_frame.rb
230
230
  - lib/lapsoss/backtrace_frame_factory.rb
231
231
  - lib/lapsoss/backtrace_processor.rb