highlight_io 0.1.2 → 0.1.4
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 -0
- data/Gemfile.lock +5 -5
- data/lib/highlight/version.rb +1 -1
- data/lib/highlight.rb +7 -5
- 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: '097aa8d0420fe1617bba3f9bc5358b4f4a4b33fc86c9100add607f0000a21a31'
|
|
4
|
+
data.tar.gz: 9c2a3730d42efa5fe5fe7b2406d6e74b660cde344a72842845834f998ccdfc6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d8a6b916b6ae7dee9a47c86e8ffba1da90c60b2ccdf12ca44b768f7e6022189377688ec24fa7efdef5defe78b3ee706dff681e447a41e0b082f7c2f182d5b0d
|
|
7
|
+
data.tar.gz: '00832a7b4bdad74f86c8d488705eb5f979c2bd05d94ca963afed72fd5d86377e8890630ecb137f5605f3bf16a0b0c7090280ece588378ba0022bff8adc5e2944'
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
highlight_io (0.1.
|
|
4
|
+
highlight_io (0.1.4)
|
|
5
5
|
grpc (~> 1.52)
|
|
6
6
|
opentelemetry-exporter-otlp (~> 0.24.0)
|
|
7
7
|
opentelemetry-instrumentation-all (~> 0.32.0)
|
|
@@ -13,9 +13,9 @@ GEM
|
|
|
13
13
|
specs:
|
|
14
14
|
ast (2.4.2)
|
|
15
15
|
google-protobuf (3.23.4-x86_64-linux)
|
|
16
|
-
googleapis-common-protos-types (1.
|
|
17
|
-
google-protobuf (~> 3.
|
|
18
|
-
grpc (1.
|
|
16
|
+
googleapis-common-protos-types (1.8.0)
|
|
17
|
+
google-protobuf (~> 3.18)
|
|
18
|
+
grpc (1.57.0-x86_64-linux)
|
|
19
19
|
google-protobuf (~> 3.23)
|
|
20
20
|
googleapis-common-protos-types (~> 1.0)
|
|
21
21
|
json (2.6.3)
|
|
@@ -240,4 +240,4 @@ DEPENDENCIES
|
|
|
240
240
|
rubocop
|
|
241
241
|
|
|
242
242
|
BUNDLED WITH
|
|
243
|
-
2.4.
|
|
243
|
+
2.4.19
|
data/lib/highlight/version.rb
CHANGED
data/lib/highlight.rb
CHANGED
|
@@ -30,7 +30,9 @@ module Highlight
|
|
|
30
30
|
|
|
31
31
|
OpenTelemetry::SDK.configure do |c|
|
|
32
32
|
c.add_span_processor(OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
|
|
33
|
-
OpenTelemetry::Exporter::OTLP::Exporter.new(
|
|
33
|
+
OpenTelemetry::Exporter::OTLP::Exporter.new(
|
|
34
|
+
endpoint: "#{@otlp_endpoint}/v1/traces", compression: 'gzip'
|
|
35
|
+
), schedule_delay: 1000, max_export_batch_size: 128, max_queue_size: 1024
|
|
34
36
|
))
|
|
35
37
|
yield c if block_given?
|
|
36
38
|
end
|
|
@@ -43,12 +45,12 @@ module Highlight
|
|
|
43
45
|
@tracer_provider.force_flush
|
|
44
46
|
end
|
|
45
47
|
|
|
46
|
-
def trace(session_id, request_id)
|
|
48
|
+
def trace(session_id, request_id, attrs = {})
|
|
47
49
|
@tracer.in_span('highlight-ctx', attributes: {
|
|
48
50
|
HIGHLIGHT_PROJECT_ATTRIBUTE => @project_id,
|
|
49
51
|
HIGHLIGHT_SESSION_ATTRIBUTE => session_id,
|
|
50
52
|
HIGHLIGHT_TRACE_ATTRIBUTE => request_id
|
|
51
|
-
}.compact) do |_span|
|
|
53
|
+
}.merge(attrs).compact) do |_span|
|
|
52
54
|
yield
|
|
53
55
|
rescue StandardError => e
|
|
54
56
|
record_exception(e)
|
|
@@ -56,11 +58,11 @@ module Highlight
|
|
|
56
58
|
end
|
|
57
59
|
end
|
|
58
60
|
|
|
59
|
-
def record_exception(e)
|
|
61
|
+
def record_exception(e, attrs = {})
|
|
60
62
|
span = OpenTelemetry::Trace.current_span
|
|
61
63
|
return unless span
|
|
62
64
|
|
|
63
|
-
span.record_exception(e)
|
|
65
|
+
span.record_exception(e, attributes: attrs)
|
|
64
66
|
end
|
|
65
67
|
|
|
66
68
|
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.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Highlight
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-09-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: grpc
|