highlight_io 0.1.2 → 0.1.3

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: 391312c21e44302ef6e836b0f33bce8af2ba7c739ec8e4999c996cf74614cbe4
4
- data.tar.gz: ac48bca9cb8f1d0dc573d5077a1efadf0b38e9b6f539862c670c666f21b015c5
3
+ metadata.gz: 0754bd5234409590b25053645a3645641bc25e6ff10f1b12fdedde96ad1036f8
4
+ data.tar.gz: a40001ec81b927edbddf710f0299cd1371058df4a7252c5e8d82e8fa98f4dbc2
5
5
  SHA512:
6
- metadata.gz: cf00cd6ae014743e2b6fdddd65fc52117d27d1679024f51aae7845f53bcbd51967063a1b1bcf0dca95e1d73abc3f0dc13738f3c345797daba709c3f9872381f6
7
- data.tar.gz: 6979cc7ffbf29ddaea91432ff6e6e31f207197d1f1dbb10b71f988338df0617e68e4b179baf8ad296ea8c35112280979a8975c82b3245502f5dec32410315552
6
+ metadata.gz: 8aadb4954b99be1d65d60e650e34f6f6475dd8c144e582a548d67e16d69c2b251ff65a2435e15e15e1007f50dc6fab168f50d0a42f7ac6851bba964fa7e874cf
7
+ data.tar.gz: 7627e7ca87a7150954875bc046a22a61f8cdd278b9efd615abbcb46d5b156e42d9b9e603b4773c2deae4f8b7dd32336004113702031872cbfcbefa1a10fe11e4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- highlight_io (0.1.2)
4
+ highlight_io (0.1.3)
5
5
  grpc (~> 1.52)
6
6
  opentelemetry-exporter-otlp (~> 0.24.0)
7
7
  opentelemetry-instrumentation-all (~> 0.32.0)
@@ -12,10 +12,10 @@ GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  ast (2.4.2)
15
- google-protobuf (3.23.4-x86_64-linux)
16
- googleapis-common-protos-types (1.7.0)
17
- google-protobuf (~> 3.14)
18
- grpc (1.56.2-x86_64-linux)
15
+ google-protobuf (3.23.4)
16
+ googleapis-common-protos-types (1.8.0)
17
+ google-protobuf (~> 3.18)
18
+ grpc (1.57.0)
19
19
  google-protobuf (~> 3.23)
20
20
  googleapis-common-protos-types (~> 1.0)
21
21
  json (2.6.3)
@@ -231,7 +231,7 @@ GEM
231
231
  unicode-display_width (2.4.2)
232
232
 
233
233
  PLATFORMS
234
- x86_64-linux
234
+ ruby
235
235
 
236
236
  DEPENDENCIES
237
237
  highlight_io!
@@ -240,4 +240,4 @@ DEPENDENCIES
240
240
  rubocop
241
241
 
242
242
  BUNDLED WITH
243
- 2.4.18
243
+ 2.4.19
@@ -1,3 +1,3 @@
1
1
  module Highlight
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
data/lib/highlight.rb CHANGED
@@ -43,12 +43,12 @@ module Highlight
43
43
  @tracer_provider.force_flush
44
44
  end
45
45
 
46
- def trace(session_id, request_id)
46
+ def trace(session_id, request_id, attrs = {})
47
47
  @tracer.in_span('highlight-ctx', attributes: {
48
48
  HIGHLIGHT_PROJECT_ATTRIBUTE => @project_id,
49
49
  HIGHLIGHT_SESSION_ATTRIBUTE => session_id,
50
50
  HIGHLIGHT_TRACE_ATTRIBUTE => request_id
51
- }.compact) do |_span|
51
+ }.merge(attrs).compact) do |_span|
52
52
  yield
53
53
  rescue StandardError => e
54
54
  record_exception(e)
@@ -56,11 +56,11 @@ module Highlight
56
56
  end
57
57
  end
58
58
 
59
- def record_exception(e)
59
+ def record_exception(e, attrs = {})
60
60
  span = OpenTelemetry::Trace.current_span
61
61
  return unless span
62
62
 
63
- span.record_exception(e)
63
+ span.record_exception(e, attributes: attrs)
64
64
  end
65
65
 
66
66
  def record_log(session_id, request_id, level, message, attrs = {})
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Highlight
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-10 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc