logbrew-sdk 0.1.13 → 0.1.14
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/README.md +1 -1
- data/lib/logbrew/sidekiq.rb +18 -16
- data/lib/logbrew/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba29c0ee35c6f7287dbdeadcc2f215b32270218de626d2338de40d8082be04a4
|
|
4
|
+
data.tar.gz: efade8df92a9d851cf9fce4f482ff632a50bcc79038157b048cdb792e6a4fb30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2e498a092d5cbaa2f09b7b9be07112e7656e33df61f73614c09cd4cd1d8d7830d3dd24b6daf1169c834847415acc19898cc0c994ca6bb6a47c972a612e13395
|
|
7
|
+
data.tar.gz: 62b25847c01ab391d7122aca956e8b591961cb2a2020b2af837d75d65c2ae508955c088663b0d78d70e0597d99f97efd0e786bc428227a3180c975567ae64a44
|
data/README.md
CHANGED
data/lib/logbrew/sidekiq.rb
CHANGED
|
@@ -47,7 +47,7 @@ module LogBrew
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
@instrumentation.send(:capture_span, self, error)
|
|
50
|
-
@instrumentation.send(:capture_terminal_issue, self) if error && terminal_failure && !cancellation?(error)
|
|
50
|
+
@instrumentation.send(:capture_terminal_issue, self, error) if error && terminal_failure && !cancellation?(error)
|
|
51
51
|
rescue StandardError => capture_error
|
|
52
52
|
@instrumentation.send(:report_capture_error, capture_error)
|
|
53
53
|
end
|
|
@@ -79,20 +79,22 @@ module LogBrew
|
|
|
79
79
|
}
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
def issue_attributes
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
82
|
+
def issue_attributes(error)
|
|
83
|
+
exception_type = IssueDiagnostics.safe_exception_type(error)
|
|
84
|
+
frame = IssueDiagnostics.stack_frames_from_exception(error).first
|
|
85
|
+
metadata = {
|
|
86
|
+
"source" => @source,
|
|
87
|
+
"sampled" => @context.sampled,
|
|
88
|
+
"retryCount" => @retry_count + 1,
|
|
89
|
+
"errorName" => exception_type
|
|
91
90
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
unless frame.nil?
|
|
92
|
+
metadata["errorFrameFile"] = frame.fetch("filename")
|
|
93
|
+
metadata["errorFrameLine"] = frame.fetch("line")
|
|
94
|
+
end
|
|
95
|
+
IssueDiagnostics.from_exception(
|
|
96
|
+
error, title: exception_type, mechanism_type: "sidekiq.job", handled: false, metadata: metadata
|
|
97
|
+
)
|
|
96
98
|
end
|
|
97
99
|
|
|
98
100
|
def failure_key
|
|
@@ -381,7 +383,7 @@ module LogBrew
|
|
|
381
383
|
)
|
|
382
384
|
end
|
|
383
385
|
|
|
384
|
-
def capture_terminal_issue(operation)
|
|
386
|
+
def capture_terminal_issue(operation, error)
|
|
385
387
|
key = operation.failure_key
|
|
386
388
|
reserved = @failure_mutex.synchronize do
|
|
387
389
|
next false if @reported_failures.key?(key)
|
|
@@ -396,7 +398,7 @@ module LogBrew
|
|
|
396
398
|
@client.issue(
|
|
397
399
|
"ruby_sidekiq_issue_#{operation.context.span_id}",
|
|
398
400
|
Time.now.utc.iso8601,
|
|
399
|
-
operation.issue_attributes
|
|
401
|
+
operation.issue_attributes(error)
|
|
400
402
|
)
|
|
401
403
|
rescue StandardError
|
|
402
404
|
@failure_mutex.synchronize { @reported_failures.delete(key) }
|
data/lib/logbrew/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logbrew-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LogBrew
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Public LogBrew Ruby SDK with typed issue diagnostics, automatic Rails
|
|
14
14
|
request/error capture, and standard-library delivery.
|