highlight_io 0.2.0 → 0.2.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 +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/lib/highlight/version.rb +1 -1
- data/lib/highlight.rb +3 -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: ce73dd45dc718a3763e06ad6168954ff402294f28ad7b99a3ced2234b8d878d0
|
4
|
+
data.tar.gz: 9c37d1382204c7e542a525a88e6ec02953bac04e11b11771532f8e3039339a9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffd101b0284c9854b1d54b3f95f852d440609ab709faebd650cd1cafd67031fe97f0230b939b21981fc6a6c1f58a5e830daf214aa7ff71d374566a64767dc43d
|
7
|
+
data.tar.gz: c8437f01919ad43ad20f35a5c3a0f59470baf7acca5708834652dbba88d8008794e4c50768777b2f46b287e496c24c83141a1ad48f870b94e836c554b855a9be
|
data/CHANGELOG.md
CHANGED
@@ -10,4 +10,8 @@
|
|
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.
|
data/Gemfile.lock
CHANGED
data/lib/highlight/version.rb
CHANGED
data/lib/highlight.rb
CHANGED
@@ -70,6 +70,7 @@ module Highlight
|
|
70
70
|
span.record_exception(e, attributes: attrs)
|
71
71
|
end
|
72
72
|
|
73
|
+
# rubocop:disable Metrics/AbcSize
|
73
74
|
def record_log(session_id, request_id, level, message, attrs = {})
|
74
75
|
caller_info = caller[0].split(':', 3)
|
75
76
|
function = caller_info[2]
|
@@ -86,13 +87,14 @@ module Highlight
|
|
86
87
|
span.status = OpenTelemetry::Trace::Status.error(message) if [Logger::ERROR, Logger::FATAL].include?(level)
|
87
88
|
span.add_event(LOG_EVENT, attributes: {
|
88
89
|
LOG_SEVERITY_ATTRIBUTE => H.log_level_string(level),
|
89
|
-
LOG_MESSAGE_ATTRIBUTE => message,
|
90
|
+
LOG_MESSAGE_ATTRIBUTE => message.to_s,
|
90
91
|
CODE_FILEPATH => caller_info[0],
|
91
92
|
CODE_LINENO => caller_info[1],
|
92
93
|
CODE_FUNCTION => function
|
93
94
|
}.merge(attrs))
|
94
95
|
end
|
95
96
|
end
|
97
|
+
# rubocop:enable Metrics/AbcSize
|
96
98
|
|
97
99
|
HighlightHeaders = Struct.new('HighlightHeaders', :session_id, :request_id)
|
98
100
|
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.1
|
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-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|