highlight_io 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +8 -8
- data/lib/highlight/version.rb +1 -1
- data/lib/highlight.rb +24 -2
- 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: 92d68b8ab3821bca22f10aac336705ea4bb272f9a62572334715dbab501c5940
|
4
|
+
data.tar.gz: 9175f4a419f534ff297eb9ad907385a0dcf1b4e2366b738ceb438d947cef4876
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c5032942516a6269fab88a89104cceba40b3279603a362142f12cd4340d080b5d484d3314f12076eb2e10c1e7fd8b9d24f7a6a21936665c827c0957139d5a2a
|
7
|
+
data.tar.gz: b89a5c22d6a8a9709c13831e535c38b68d3b10fdc48ca0577809978a57b65eccc374964632e7d0c3e8cf4feafe4f4c9676a6811b6d9ffdf2bedd5e2883023298
|
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.
|
4
|
+
highlight_io (0.4.0)
|
5
5
|
grpc (~> 1.65)
|
6
6
|
opentelemetry-exporter-otlp (~> 0.28.1)
|
7
7
|
opentelemetry-instrumentation-all (~> 0.62.1)
|
@@ -12,8 +12,8 @@ GEM
|
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
14
|
ast (2.4.2)
|
15
|
-
google-protobuf (3.25.
|
16
|
-
google-protobuf (3.25.
|
15
|
+
google-protobuf (3.25.4-arm64-darwin)
|
16
|
+
google-protobuf (3.25.4-x86_64-linux)
|
17
17
|
googleapis-common-protos-types (1.15.0)
|
18
18
|
google-protobuf (>= 3.18, < 5.a)
|
19
19
|
grpc (1.65.2-arm64-darwin)
|
@@ -48,17 +48,17 @@ GEM
|
|
48
48
|
opentelemetry-api (~> 1.0)
|
49
49
|
opentelemetry-instrumentation-base (~> 0.22.1)
|
50
50
|
opentelemetry-instrumentation-rack (~> 0.21)
|
51
|
-
opentelemetry-instrumentation-action_view (0.7.
|
51
|
+
opentelemetry-instrumentation-action_view (0.7.2)
|
52
52
|
opentelemetry-api (~> 1.0)
|
53
53
|
opentelemetry-instrumentation-active_support (~> 0.1)
|
54
54
|
opentelemetry-instrumentation-base (~> 0.22.1)
|
55
|
-
opentelemetry-instrumentation-active_job (0.7.
|
55
|
+
opentelemetry-instrumentation-active_job (0.7.7)
|
56
56
|
opentelemetry-api (~> 1.0)
|
57
57
|
opentelemetry-instrumentation-base (~> 0.22.1)
|
58
58
|
opentelemetry-instrumentation-active_model_serializers (0.20.2)
|
59
59
|
opentelemetry-api (~> 1.0)
|
60
60
|
opentelemetry-instrumentation-base (~> 0.22.1)
|
61
|
-
opentelemetry-instrumentation-active_record (0.7.
|
61
|
+
opentelemetry-instrumentation-active_record (0.7.4)
|
62
62
|
opentelemetry-api (~> 1.0)
|
63
63
|
opentelemetry-instrumentation-base (~> 0.22.1)
|
64
64
|
opentelemetry-instrumentation-active_support (0.6.0)
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
opentelemetry-instrumentation-aws_sdk (0.5.4)
|
106
106
|
opentelemetry-api (~> 1.0)
|
107
107
|
opentelemetry-instrumentation-base (~> 0.22.1)
|
108
|
-
opentelemetry-instrumentation-base (0.22.
|
108
|
+
opentelemetry-instrumentation-base (0.22.6)
|
109
109
|
opentelemetry-api (~> 1.0)
|
110
110
|
opentelemetry-common (~> 0.21)
|
111
111
|
opentelemetry-registry (~> 0.1)
|
@@ -176,7 +176,7 @@ GEM
|
|
176
176
|
opentelemetry-instrumentation-rack (0.24.6)
|
177
177
|
opentelemetry-api (~> 1.0)
|
178
178
|
opentelemetry-instrumentation-base (~> 0.22.1)
|
179
|
-
opentelemetry-instrumentation-rails (0.31.
|
179
|
+
opentelemetry-instrumentation-rails (0.31.2)
|
180
180
|
opentelemetry-api (~> 1.0)
|
181
181
|
opentelemetry-instrumentation-action_mailer (~> 0.1.0)
|
182
182
|
opentelemetry-instrumentation-action_pack (~> 0.9.0)
|
data/lib/highlight/version.rb
CHANGED
data/lib/highlight.rb
CHANGED
@@ -18,6 +18,10 @@ module Highlight
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
def self.init(project_id, environment: '', otlp_endpoint: OTLP_HTTP, &block)
|
22
|
+
H.new(project_id, environment: environment, otlp_endpoint: otlp_endpoint, &block)
|
23
|
+
end
|
24
|
+
|
21
25
|
def self.start_span(name, attrs = {}, &block)
|
22
26
|
if block_given?
|
23
27
|
H.instance.start_span(name, attrs, &block)
|
@@ -195,6 +199,8 @@ module Highlight
|
|
195
199
|
end
|
196
200
|
|
197
201
|
class Logger < ::Logger
|
202
|
+
include ActiveSupport::LoggerSilence if defined?(::ActiveSupport::LoggerSilence)
|
203
|
+
|
198
204
|
def initialize(*args)
|
199
205
|
super
|
200
206
|
@local_level = nil
|
@@ -223,12 +229,18 @@ module Highlight
|
|
223
229
|
def self.included(base)
|
224
230
|
base.extend(ClassMethods)
|
225
231
|
base.helper_method(:highlight_headers)
|
232
|
+
base.around_action(:with_highlight_context)
|
226
233
|
end
|
227
234
|
|
228
235
|
def with_highlight_context(&block)
|
229
236
|
set_highlight_headers
|
230
|
-
|
231
|
-
|
237
|
+
|
238
|
+
H.instance.trace(
|
239
|
+
highlight_headers.session_id,
|
240
|
+
highlight_headers.request_id,
|
241
|
+
name: "#{request.method.upcase} #{request.path}",
|
242
|
+
&block
|
243
|
+
)
|
232
244
|
end
|
233
245
|
|
234
246
|
private
|
@@ -285,4 +297,14 @@ module Highlight
|
|
285
297
|
tag(:meta, name: 'traceparent', content: "00-#{hex_trace_id}-#{hex_span_id}-01")
|
286
298
|
end
|
287
299
|
end
|
300
|
+
|
301
|
+
if defined?(::Rails::Railtie)
|
302
|
+
class Railtie < ::Rails::Railtie
|
303
|
+
config.after_initialize do
|
304
|
+
ActiveSupport.on_load(:action_controller) do
|
305
|
+
include ::Highlight::Integrations::Rails
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
309
|
+
end
|
288
310
|
end
|
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Highlight
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|