highlight_io 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +5 -3
- data/lib/highlight/version.rb +1 -1
- data/lib/highlight.rb +3 -4
- 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: 3acb2eb8b48459af5702aafc914f4a75a301c9f93d1dba87ae0e94ec6659fa80
|
4
|
+
data.tar.gz: 95312deb9f9e00446cddfe5485636fb7a9791275f87ce5e5c800b4465b331815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c11d2d2754b7eea0218936df2b802460048ebebdc33a8ca232a76b4c071ca2c841fb2baa250dbaa42f61576d003135ba61db0054e256da86069023923abd783b
|
7
|
+
data.tar.gz: 259adac4ee276371a82b01e7b9cfc5a11ae965c61c6e38f850858a24110b99e94033356b0231c305752d203aa882698b8b83e9eb2e4c454c01b68eb70f96e777
|
data/CHANGELOG.md
CHANGED
@@ -10,4 +10,12 @@
|
|
10
10
|
## 0.2.0
|
11
11
|
|
12
12
|
- Support setting `environment` attribute to SDK initialization.
|
13
|
-
- `otlp_endpoint` updated to keyword parameter when initializing.
|
13
|
+
- `otlp_endpoint` updated to keyword parameter when initializing.
|
14
|
+
|
15
|
+
## 0.2.1
|
16
|
+
|
17
|
+
- Ensure `message` on logs is always a string.
|
18
|
+
|
19
|
+
## 0.2.2
|
20
|
+
|
21
|
+
- Fix duplicate errors recorded on traces.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
highlight_io (0.2.
|
4
|
+
highlight_io (0.2.2)
|
5
5
|
grpc (~> 1.52)
|
6
6
|
opentelemetry-exporter-otlp (~> 0.24.0)
|
7
7
|
opentelemetry-instrumentation-all (~> 0.32.0)
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
google-protobuf (3.23.4)
|
16
16
|
googleapis-common-protos-types (1.8.0)
|
17
17
|
google-protobuf (~> 3.18)
|
18
|
-
grpc (1.
|
18
|
+
grpc (1.58.0)
|
19
19
|
google-protobuf (~> 3.23)
|
20
20
|
googleapis-common-protos-types (~> 1.0)
|
21
21
|
json (2.6.3)
|
@@ -213,7 +213,8 @@ GEM
|
|
213
213
|
rainbow (3.1.1)
|
214
214
|
rake (12.3.3)
|
215
215
|
regexp_parser (2.8.1)
|
216
|
-
rexml (3.2.
|
216
|
+
rexml (3.2.8)
|
217
|
+
strscan (>= 3.0.9)
|
217
218
|
rubocop (1.50.2)
|
218
219
|
json (~> 2.3)
|
219
220
|
parallel (~> 1.10)
|
@@ -228,6 +229,7 @@ GEM
|
|
228
229
|
parser (>= 3.2.1.0)
|
229
230
|
ruby-progressbar (1.13.0)
|
230
231
|
ruby2_keywords (0.0.5)
|
232
|
+
strscan (3.1.0)
|
231
233
|
unicode-display_width (2.4.2)
|
232
234
|
|
233
235
|
PLATFORMS
|
data/lib/highlight/version.rb
CHANGED
data/lib/highlight.rb
CHANGED
@@ -57,9 +57,6 @@ module Highlight
|
|
57
57
|
HIGHLIGHT_TRACE_ATTRIBUTE => request_id
|
58
58
|
}.merge(attrs).compact) do |_span|
|
59
59
|
yield
|
60
|
-
rescue StandardError => e
|
61
|
-
record_exception(e)
|
62
|
-
raise
|
63
60
|
end
|
64
61
|
end
|
65
62
|
|
@@ -70,6 +67,7 @@ module Highlight
|
|
70
67
|
span.record_exception(e, attributes: attrs)
|
71
68
|
end
|
72
69
|
|
70
|
+
# rubocop:disable Metrics/AbcSize
|
73
71
|
def record_log(session_id, request_id, level, message, attrs = {})
|
74
72
|
caller_info = caller[0].split(':', 3)
|
75
73
|
function = caller_info[2]
|
@@ -86,13 +84,14 @@ module Highlight
|
|
86
84
|
span.status = OpenTelemetry::Trace::Status.error(message) if [Logger::ERROR, Logger::FATAL].include?(level)
|
87
85
|
span.add_event(LOG_EVENT, attributes: {
|
88
86
|
LOG_SEVERITY_ATTRIBUTE => H.log_level_string(level),
|
89
|
-
LOG_MESSAGE_ATTRIBUTE => message,
|
87
|
+
LOG_MESSAGE_ATTRIBUTE => message.to_s,
|
90
88
|
CODE_FILEPATH => caller_info[0],
|
91
89
|
CODE_LINENO => caller_info[1],
|
92
90
|
CODE_FUNCTION => function
|
93
91
|
}.merge(attrs))
|
94
92
|
end
|
95
93
|
end
|
94
|
+
# rubocop:enable Metrics/AbcSize
|
96
95
|
|
97
96
|
HighlightHeaders = Struct.new('HighlightHeaders', :session_id, :request_id)
|
98
97
|
def self.parse_headers(headers)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: highlight_io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Highlight
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|