highlight_io 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c1f3848acbf7cf77d05ac8ef6218eb1fb15f094665a6f0547995e4a4f4d6b06
4
- data.tar.gz: 03420b8ba7f5f6b1c2a452a3fef8f7d48d24f3e7f038f9ee9b6f3de456016c15
3
+ metadata.gz: ce73dd45dc718a3763e06ad6168954ff402294f28ad7b99a3ced2234b8d878d0
4
+ data.tar.gz: 9c37d1382204c7e542a525a88e6ec02953bac04e11b11771532f8e3039339a9e
5
5
  SHA512:
6
- metadata.gz: 2420cb4092f937c7427f10e0c674b131a81cb5ea0ad33f68376493d67e6ef40129b0273adac416ec2b65fd31d15230a9887bd52e9c8b01b9c326eb05a3999e4d
7
- data.tar.gz: 96fa150775802c742301a7242b2146024c616215a696b62dd2f6094d1451f2b8e9b72bd816f4a520ce9f1e6d239edb8336ababe1b995c3e92db9787071a627f2
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- highlight_io (0.2.0)
4
+ highlight_io (0.2.1)
5
5
  grpc (~> 1.52)
6
6
  opentelemetry-exporter-otlp (~> 0.24.0)
7
7
  opentelemetry-instrumentation-all (~> 0.32.0)
@@ -1,3 +1,3 @@
1
1
  module Highlight
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
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.0
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: 2023-12-14 00:00:00.000000000 Z
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc