highlight_io 0.2.2 → 0.3.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: 3acb2eb8b48459af5702aafc914f4a75a301c9f93d1dba87ae0e94ec6659fa80
4
- data.tar.gz: 95312deb9f9e00446cddfe5485636fb7a9791275f87ce5e5c800b4465b331815
3
+ metadata.gz: 8ac88fa49d586b18a7e1be34e4f2bbda4cdd574fcbeb83ffc97b75c0101d5b43
4
+ data.tar.gz: 59840de16d8b5d3839c18aac425b7ea47aa76942a3ff4e539e8e2af623f1797b
5
5
  SHA512:
6
- metadata.gz: c11d2d2754b7eea0218936df2b802460048ebebdc33a8ca232a76b4c071ca2c841fb2baa250dbaa42f61576d003135ba61db0054e256da86069023923abd783b
7
- data.tar.gz: 259adac4ee276371a82b01e7b9cfc5a11ae965c61c6e38f850858a24110b99e94033356b0231c305752d203aa882698b8b83e9eb2e4c454c01b68eb70f96e777
6
+ metadata.gz: 834eeda394658f10de79c9102cb18415a0b2918030957a105cc6ba7505fe2e20d8ad63d28c4ca6ebe6dce7091207060343661c305a67844fc41c2cdc0e00446b
7
+ data.tar.gz: 5723050e4cc62d07d4c53dfb6a1d34fb3771c622833643a0cacc7a5a5f6987ae432de560f16bb000e81631a8c8fdbad296cd79972811162a60dd303b2b1ad5ed
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
2
+ TargetRubyVersion: 3.0
3
3
 
4
4
  Style/FrozenStringLiteralComment:
5
5
  Enabled: false
@@ -10,5 +10,14 @@ Style/Documentation:
10
10
  Metrics/MethodLength:
11
11
  Enabled: false
12
12
 
13
+ Metrics/CyclomaticComplexity:
14
+ Max: 8
15
+
13
16
  Naming/MethodParameterName:
14
17
  Enabled: false
18
+
19
+ Metrics/AbcSize:
20
+ Enabled: false
21
+
22
+ Metrics/ClassLength:
23
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,209 +1,229 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- highlight_io (0.2.2)
5
- grpc (~> 1.52)
6
- opentelemetry-exporter-otlp (~> 0.24.0)
7
- opentelemetry-instrumentation-all (~> 0.32.0)
8
- opentelemetry-sdk (~> 1.2)
9
- opentelemetry-semantic_conventions (~> 1.8.0)
4
+ highlight_io (0.3.1)
5
+ grpc (~> 1.65)
6
+ opentelemetry-exporter-otlp (~> 0.28.1)
7
+ opentelemetry-instrumentation-all (~> 0.62.1)
8
+ opentelemetry-sdk (~> 1.5.0)
9
+ opentelemetry-semantic_conventions (~> 1.10.1)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  ast (2.4.2)
15
- google-protobuf (3.23.4)
16
- googleapis-common-protos-types (1.8.0)
17
- google-protobuf (~> 3.18)
18
- grpc (1.58.0)
19
- google-protobuf (~> 3.23)
15
+ google-protobuf (3.25.3-arm64-darwin)
16
+ google-protobuf (3.25.3-x86_64-linux)
17
+ googleapis-common-protos-types (1.15.0)
18
+ google-protobuf (>= 3.18, < 5.a)
19
+ grpc (1.65.2-arm64-darwin)
20
+ google-protobuf (>= 3.25, < 5.0)
21
+ googleapis-common-protos-types (~> 1.0)
22
+ grpc (1.65.2-x86_64-linux)
23
+ google-protobuf (>= 3.25, < 5.0)
20
24
  googleapis-common-protos-types (~> 1.0)
21
25
  json (2.6.3)
26
+ language_server-protocol (3.17.0.3)
22
27
  minitest (5.18.0)
23
- opentelemetry-api (1.1.0)
24
- opentelemetry-common (0.19.7)
28
+ opentelemetry-api (1.3.0)
29
+ opentelemetry-common (0.21.0)
25
30
  opentelemetry-api (~> 1.0)
26
- opentelemetry-exporter-otlp (0.24.2)
27
- google-protobuf (~> 3.19)
31
+ opentelemetry-exporter-otlp (0.28.1)
32
+ google-protobuf (>= 3.18)
28
33
  googleapis-common-protos-types (~> 1.3)
29
34
  opentelemetry-api (~> 1.1)
30
- opentelemetry-common (~> 0.19.6)
35
+ opentelemetry-common (~> 0.20)
31
36
  opentelemetry-sdk (~> 1.2)
32
37
  opentelemetry-semantic_conventions
33
- opentelemetry-instrumentation-action_pack (0.5.0)
38
+ opentelemetry-helpers-mysql (0.1.1)
34
39
  opentelemetry-api (~> 1.0)
35
- opentelemetry-instrumentation-base (~> 0.21.0)
36
- opentelemetry-instrumentation-rack (~> 0.21)
37
- opentelemetry-instrumentation-action_view (0.4.0)
40
+ opentelemetry-common (~> 0.21)
41
+ opentelemetry-helpers-sql-obfuscation (0.1.1)
42
+ opentelemetry-common (~> 0.21)
43
+ opentelemetry-instrumentation-action_mailer (0.1.0)
38
44
  opentelemetry-api (~> 1.0)
39
45
  opentelemetry-instrumentation-active_support (~> 0.1)
40
- opentelemetry-instrumentation-base (~> 0.20)
41
- opentelemetry-instrumentation-active_job (0.4.0)
42
- opentelemetry-api (~> 1.0)
43
- opentelemetry-instrumentation-base (~> 0.21.0)
44
- opentelemetry-instrumentation-active_model_serializers (0.19.1)
45
- opentelemetry-api (~> 1.0)
46
- opentelemetry-instrumentation-base (~> 0.21.0)
47
- opentelemetry-instrumentation-active_record (0.5.0)
48
- opentelemetry-api (~> 1.0)
49
- opentelemetry-instrumentation-base (~> 0.21.0)
50
- ruby2_keywords
51
- opentelemetry-instrumentation-active_support (0.3.0)
52
- opentelemetry-api (~> 1.0)
53
- opentelemetry-instrumentation-base (~> 0.21.0)
54
- opentelemetry-instrumentation-all (0.32.0)
55
- opentelemetry-instrumentation-active_model_serializers (~> 0.19.0)
56
- opentelemetry-instrumentation-aws_sdk (~> 0.3.0)
57
- opentelemetry-instrumentation-bunny (~> 0.19.0)
58
- opentelemetry-instrumentation-concurrent_ruby (~> 0.20.0)
59
- opentelemetry-instrumentation-dalli (~> 0.22.0)
60
- opentelemetry-instrumentation-delayed_job (~> 0.19.0)
61
- opentelemetry-instrumentation-ethon (~> 0.20.0)
62
- opentelemetry-instrumentation-excon (~> 0.20.0)
63
- opentelemetry-instrumentation-faraday (~> 0.22.0)
64
- opentelemetry-instrumentation-graphql (~> 0.23.0)
65
- opentelemetry-instrumentation-http (~> 0.21.0)
66
- opentelemetry-instrumentation-http_client (~> 0.21.0)
67
- opentelemetry-instrumentation-koala (~> 0.19.0)
68
- opentelemetry-instrumentation-lmdb (~> 0.21.0)
69
- opentelemetry-instrumentation-mongo (~> 0.21.0)
70
- opentelemetry-instrumentation-mysql2 (~> 0.22.0)
71
- opentelemetry-instrumentation-net_http (~> 0.21.0)
72
- opentelemetry-instrumentation-pg (~> 0.23.0)
73
- opentelemetry-instrumentation-que (~> 0.5.0)
74
- opentelemetry-instrumentation-racecar (~> 0.1.0)
75
- opentelemetry-instrumentation-rack (~> 0.22.0)
76
- opentelemetry-instrumentation-rails (~> 0.25.0)
77
- opentelemetry-instrumentation-rake (~> 0.1.0)
78
- opentelemetry-instrumentation-rdkafka (~> 0.2.0)
79
- opentelemetry-instrumentation-redis (~> 0.24.0)
80
- opentelemetry-instrumentation-resque (~> 0.3.0)
81
- opentelemetry-instrumentation-restclient (~> 0.21.0)
82
- opentelemetry-instrumentation-ruby_kafka (~> 0.19.0)
83
- opentelemetry-instrumentation-sidekiq (~> 0.22.0)
84
- opentelemetry-instrumentation-sinatra (~> 0.21.0)
85
- opentelemetry-instrumentation-trilogy (~> 0.52.0)
86
- opentelemetry-instrumentation-aws_sdk (0.3.2)
87
- opentelemetry-api (~> 1.0)
88
- opentelemetry-instrumentation-base (~> 0.21.0)
89
- opentelemetry-instrumentation-base (0.21.1)
46
+ opentelemetry-instrumentation-base (~> 0.22.1)
47
+ opentelemetry-instrumentation-action_pack (0.9.0)
48
+ opentelemetry-api (~> 1.0)
49
+ opentelemetry-instrumentation-base (~> 0.22.1)
50
+ opentelemetry-instrumentation-rack (~> 0.21)
51
+ opentelemetry-instrumentation-action_view (0.7.1)
90
52
  opentelemetry-api (~> 1.0)
53
+ opentelemetry-instrumentation-active_support (~> 0.1)
54
+ opentelemetry-instrumentation-base (~> 0.22.1)
55
+ opentelemetry-instrumentation-active_job (0.7.4)
56
+ opentelemetry-api (~> 1.0)
57
+ opentelemetry-instrumentation-base (~> 0.22.1)
58
+ opentelemetry-instrumentation-active_model_serializers (0.20.2)
59
+ opentelemetry-api (~> 1.0)
60
+ opentelemetry-instrumentation-base (~> 0.22.1)
61
+ opentelemetry-instrumentation-active_record (0.7.2)
62
+ opentelemetry-api (~> 1.0)
63
+ opentelemetry-instrumentation-base (~> 0.22.1)
64
+ opentelemetry-instrumentation-active_support (0.6.0)
65
+ opentelemetry-api (~> 1.0)
66
+ opentelemetry-instrumentation-base (~> 0.22.1)
67
+ opentelemetry-instrumentation-all (0.62.1)
68
+ opentelemetry-instrumentation-active_model_serializers (~> 0.20.1)
69
+ opentelemetry-instrumentation-aws_lambda (~> 0.1.0)
70
+ opentelemetry-instrumentation-aws_sdk (~> 0.5.0)
71
+ opentelemetry-instrumentation-bunny (~> 0.21.0)
72
+ opentelemetry-instrumentation-concurrent_ruby (~> 0.21.1)
73
+ opentelemetry-instrumentation-dalli (~> 0.25.0)
74
+ opentelemetry-instrumentation-delayed_job (~> 0.22.0)
75
+ opentelemetry-instrumentation-ethon (~> 0.21.1)
76
+ opentelemetry-instrumentation-excon (~> 0.22.0)
77
+ opentelemetry-instrumentation-faraday (~> 0.24.0)
78
+ opentelemetry-instrumentation-grape (~> 0.2.0)
79
+ opentelemetry-instrumentation-graphql (~> 0.28.0)
80
+ opentelemetry-instrumentation-gruf (~> 0.2.0)
81
+ opentelemetry-instrumentation-http (~> 0.23.1)
82
+ opentelemetry-instrumentation-http_client (~> 0.22.1)
83
+ opentelemetry-instrumentation-koala (~> 0.20.1)
84
+ opentelemetry-instrumentation-lmdb (~> 0.22.1)
85
+ opentelemetry-instrumentation-mongo (~> 0.22.1)
86
+ opentelemetry-instrumentation-mysql2 (~> 0.27.0)
87
+ opentelemetry-instrumentation-net_http (~> 0.22.1)
88
+ opentelemetry-instrumentation-pg (~> 0.27.0)
89
+ opentelemetry-instrumentation-que (~> 0.8.0)
90
+ opentelemetry-instrumentation-racecar (~> 0.3.0)
91
+ opentelemetry-instrumentation-rack (~> 0.24.0)
92
+ opentelemetry-instrumentation-rails (~> 0.31.0)
93
+ opentelemetry-instrumentation-rake (~> 0.2.1)
94
+ opentelemetry-instrumentation-rdkafka (~> 0.4.0)
95
+ opentelemetry-instrumentation-redis (~> 0.25.1)
96
+ opentelemetry-instrumentation-resque (~> 0.5.0)
97
+ opentelemetry-instrumentation-restclient (~> 0.22.1)
98
+ opentelemetry-instrumentation-ruby_kafka (~> 0.21.0)
99
+ opentelemetry-instrumentation-sidekiq (~> 0.25.0)
100
+ opentelemetry-instrumentation-sinatra (~> 0.24.0)
101
+ opentelemetry-instrumentation-trilogy (~> 0.59.0)
102
+ opentelemetry-instrumentation-aws_lambda (0.1.1)
103
+ opentelemetry-api (~> 1.0)
104
+ opentelemetry-instrumentation-base (~> 0.22.1)
105
+ opentelemetry-instrumentation-aws_sdk (0.5.4)
106
+ opentelemetry-api (~> 1.0)
107
+ opentelemetry-instrumentation-base (~> 0.22.1)
108
+ opentelemetry-instrumentation-base (0.22.5)
109
+ opentelemetry-api (~> 1.0)
110
+ opentelemetry-common (~> 0.21)
91
111
  opentelemetry-registry (~> 0.1)
92
- opentelemetry-instrumentation-bunny (0.19.1)
112
+ opentelemetry-instrumentation-bunny (0.21.4)
93
113
  opentelemetry-api (~> 1.0)
94
- opentelemetry-instrumentation-base (~> 0.21.0)
95
- opentelemetry-instrumentation-concurrent_ruby (0.20.1)
114
+ opentelemetry-instrumentation-base (~> 0.22.1)
115
+ opentelemetry-instrumentation-concurrent_ruby (0.21.4)
96
116
  opentelemetry-api (~> 1.0)
97
- opentelemetry-instrumentation-base (~> 0.21.0)
98
- opentelemetry-instrumentation-dalli (0.22.2)
117
+ opentelemetry-instrumentation-base (~> 0.22.1)
118
+ opentelemetry-instrumentation-dalli (0.25.4)
99
119
  opentelemetry-api (~> 1.0)
100
- opentelemetry-common (~> 0.19.3)
101
- opentelemetry-instrumentation-base (~> 0.21.0)
102
- opentelemetry-instrumentation-delayed_job (0.19.1)
120
+ opentelemetry-instrumentation-base (~> 0.22.1)
121
+ opentelemetry-instrumentation-delayed_job (0.22.4)
103
122
  opentelemetry-api (~> 1.0)
104
- opentelemetry-instrumentation-base (~> 0.21.0)
105
- opentelemetry-instrumentation-ethon (0.20.1)
123
+ opentelemetry-instrumentation-base (~> 0.22.1)
124
+ opentelemetry-instrumentation-ethon (0.21.8)
106
125
  opentelemetry-api (~> 1.0)
107
- opentelemetry-common (~> 0.19.3)
108
- opentelemetry-instrumentation-base (~> 0.21.0)
109
- opentelemetry-instrumentation-excon (0.20.1)
126
+ opentelemetry-instrumentation-base (~> 0.22.1)
127
+ opentelemetry-instrumentation-excon (0.22.4)
110
128
  opentelemetry-api (~> 1.0)
111
- opentelemetry-common (~> 0.19.3)
112
- opentelemetry-instrumentation-base (~> 0.21.0)
113
- opentelemetry-instrumentation-faraday (0.22.0)
129
+ opentelemetry-instrumentation-base (~> 0.22.1)
130
+ opentelemetry-instrumentation-faraday (0.24.6)
114
131
  opentelemetry-api (~> 1.0)
115
- opentelemetry-common (~> 0.19.3)
116
- opentelemetry-instrumentation-base (~> 0.21.0)
117
- opentelemetry-instrumentation-graphql (0.23.0)
132
+ opentelemetry-instrumentation-base (~> 0.22.1)
133
+ opentelemetry-instrumentation-grape (0.2.0)
134
+ opentelemetry-api (~> 1.0)
135
+ opentelemetry-instrumentation-base (~> 0.22.1)
136
+ opentelemetry-instrumentation-rack (~> 0.21)
137
+ opentelemetry-instrumentation-graphql (0.28.4)
118
138
  opentelemetry-api (~> 1.0)
119
- opentelemetry-instrumentation-base (~> 0.21.0)
120
- opentelemetry-instrumentation-http (0.21.0)
139
+ opentelemetry-instrumentation-base (~> 0.22.1)
140
+ opentelemetry-instrumentation-gruf (0.2.1)
141
+ opentelemetry-api (>= 1.0.0)
142
+ opentelemetry-instrumentation-base (~> 0.22.1)
143
+ opentelemetry-instrumentation-http (0.23.4)
121
144
  opentelemetry-api (~> 1.0)
122
- opentelemetry-instrumentation-base (~> 0.21.0)
123
- opentelemetry-instrumentation-http_client (0.21.0)
145
+ opentelemetry-instrumentation-base (~> 0.22.1)
146
+ opentelemetry-instrumentation-http_client (0.22.7)
124
147
  opentelemetry-api (~> 1.0)
125
- opentelemetry-common (~> 0.19.3)
126
- opentelemetry-instrumentation-base (~> 0.21.0)
127
- opentelemetry-instrumentation-koala (0.19.1)
148
+ opentelemetry-instrumentation-base (~> 0.22.1)
149
+ opentelemetry-instrumentation-koala (0.20.5)
128
150
  opentelemetry-api (~> 1.0)
129
- opentelemetry-common (~> 0.19.3)
130
- opentelemetry-instrumentation-base (~> 0.21.0)
131
- opentelemetry-instrumentation-lmdb (0.21.1)
151
+ opentelemetry-instrumentation-base (~> 0.22.1)
152
+ opentelemetry-instrumentation-lmdb (0.22.3)
132
153
  opentelemetry-api (~> 1.0)
133
- opentelemetry-instrumentation-base (~> 0.21.0)
134
- opentelemetry-instrumentation-mongo (0.21.1)
154
+ opentelemetry-instrumentation-base (~> 0.22.1)
155
+ opentelemetry-instrumentation-mongo (0.22.4)
135
156
  opentelemetry-api (~> 1.0)
136
- opentelemetry-instrumentation-base (~> 0.21.0)
137
- opentelemetry-instrumentation-mysql2 (0.22.0)
157
+ opentelemetry-instrumentation-base (~> 0.22.1)
158
+ opentelemetry-instrumentation-mysql2 (0.27.2)
138
159
  opentelemetry-api (~> 1.0)
139
- opentelemetry-instrumentation-base (~> 0.21.0)
140
- opentelemetry-instrumentation-net_http (0.21.1)
160
+ opentelemetry-helpers-mysql
161
+ opentelemetry-helpers-sql-obfuscation
162
+ opentelemetry-instrumentation-base (~> 0.22.1)
163
+ opentelemetry-instrumentation-net_http (0.22.7)
141
164
  opentelemetry-api (~> 1.0)
142
- opentelemetry-common (~> 0.19.3)
143
- opentelemetry-instrumentation-base (~> 0.21.0)
144
- opentelemetry-instrumentation-pg (0.23.0)
165
+ opentelemetry-instrumentation-base (~> 0.22.1)
166
+ opentelemetry-instrumentation-pg (0.27.4)
145
167
  opentelemetry-api (~> 1.0)
146
- opentelemetry-instrumentation-base (~> 0.21.0)
147
- opentelemetry-instrumentation-que (0.5.1)
168
+ opentelemetry-helpers-sql-obfuscation
169
+ opentelemetry-instrumentation-base (~> 0.22.1)
170
+ opentelemetry-instrumentation-que (0.8.3)
148
171
  opentelemetry-api (~> 1.0)
149
- opentelemetry-instrumentation-base (~> 0.21.0)
150
- opentelemetry-instrumentation-racecar (0.1.2)
172
+ opentelemetry-instrumentation-base (~> 0.22.1)
173
+ opentelemetry-instrumentation-racecar (0.3.4)
151
174
  opentelemetry-api (~> 1.0)
152
- opentelemetry-instrumentation-base (~> 0.21.0)
153
- opentelemetry-instrumentation-rack (0.22.1)
175
+ opentelemetry-instrumentation-base (~> 0.22.1)
176
+ opentelemetry-instrumentation-rack (0.24.6)
154
177
  opentelemetry-api (~> 1.0)
155
- opentelemetry-common (~> 0.19.3)
156
- opentelemetry-instrumentation-base (~> 0.21.0)
157
- opentelemetry-instrumentation-rails (0.25.0)
178
+ opentelemetry-instrumentation-base (~> 0.22.1)
179
+ opentelemetry-instrumentation-rails (0.31.1)
158
180
  opentelemetry-api (~> 1.0)
159
- opentelemetry-instrumentation-action_pack (~> 0.5.0)
160
- opentelemetry-instrumentation-action_view (~> 0.4.0)
161
- opentelemetry-instrumentation-active_job (~> 0.4.0)
162
- opentelemetry-instrumentation-active_record (~> 0.5.0)
163
- opentelemetry-instrumentation-active_support (~> 0.3.0)
164
- opentelemetry-instrumentation-base (~> 0.21.0)
165
- opentelemetry-instrumentation-rake (0.1.1)
181
+ opentelemetry-instrumentation-action_mailer (~> 0.1.0)
182
+ opentelemetry-instrumentation-action_pack (~> 0.9.0)
183
+ opentelemetry-instrumentation-action_view (~> 0.7.0)
184
+ opentelemetry-instrumentation-active_job (~> 0.7.0)
185
+ opentelemetry-instrumentation-active_record (~> 0.7.0)
186
+ opentelemetry-instrumentation-active_support (~> 0.6.0)
187
+ opentelemetry-instrumentation-base (~> 0.22.1)
188
+ opentelemetry-instrumentation-rake (0.2.2)
166
189
  opentelemetry-api (~> 1.0)
167
- opentelemetry-instrumentation-base (~> 0.21.0)
168
- opentelemetry-instrumentation-rdkafka (0.2.3)
190
+ opentelemetry-instrumentation-base (~> 0.22.1)
191
+ opentelemetry-instrumentation-rdkafka (0.4.8)
169
192
  opentelemetry-api (~> 1.0)
170
- opentelemetry-common (~> 0.19.3)
171
- opentelemetry-instrumentation-base (~> 0.21.0)
172
- opentelemetry-instrumentation-redis (0.24.1)
193
+ opentelemetry-instrumentation-base (~> 0.22.1)
194
+ opentelemetry-instrumentation-redis (0.25.7)
173
195
  opentelemetry-api (~> 1.0)
174
- opentelemetry-common (~> 0.19.3)
175
- opentelemetry-instrumentation-base (~> 0.21.0)
176
- opentelemetry-instrumentation-resque (0.3.1)
196
+ opentelemetry-instrumentation-base (~> 0.22.1)
197
+ opentelemetry-instrumentation-resque (0.5.2)
177
198
  opentelemetry-api (~> 1.0)
178
- opentelemetry-instrumentation-base (~> 0.21.0)
179
- opentelemetry-instrumentation-restclient (0.21.0)
199
+ opentelemetry-instrumentation-base (~> 0.22.1)
200
+ opentelemetry-instrumentation-restclient (0.22.7)
180
201
  opentelemetry-api (~> 1.0)
181
- opentelemetry-common (~> 0.19.3)
182
- opentelemetry-instrumentation-base (~> 0.21.0)
183
- opentelemetry-instrumentation-ruby_kafka (0.19.1)
202
+ opentelemetry-instrumentation-base (~> 0.22.1)
203
+ opentelemetry-instrumentation-ruby_kafka (0.21.3)
184
204
  opentelemetry-api (~> 1.0)
185
- opentelemetry-instrumentation-base (~> 0.21.0)
186
- opentelemetry-instrumentation-sidekiq (0.22.1)
205
+ opentelemetry-instrumentation-base (~> 0.22.1)
206
+ opentelemetry-instrumentation-sidekiq (0.25.7)
187
207
  opentelemetry-api (~> 1.0)
188
- opentelemetry-common (~> 0.19.3)
189
- opentelemetry-instrumentation-base (~> 0.21.0)
190
- opentelemetry-instrumentation-sinatra (0.21.5)
208
+ opentelemetry-instrumentation-base (~> 0.22.1)
209
+ opentelemetry-instrumentation-sinatra (0.24.1)
191
210
  opentelemetry-api (~> 1.0)
192
- opentelemetry-common (~> 0.19.3)
193
- opentelemetry-instrumentation-base (~> 0.21.0)
211
+ opentelemetry-instrumentation-base (~> 0.22.1)
194
212
  opentelemetry-instrumentation-rack (~> 0.21)
195
- opentelemetry-instrumentation-trilogy (0.52.0)
213
+ opentelemetry-instrumentation-trilogy (0.59.3)
196
214
  opentelemetry-api (~> 1.0)
197
- opentelemetry-instrumentation-base (~> 0.21.0)
215
+ opentelemetry-helpers-mysql
216
+ opentelemetry-helpers-sql-obfuscation
217
+ opentelemetry-instrumentation-base (~> 0.22.1)
198
218
  opentelemetry-semantic_conventions (>= 1.8.0)
199
- opentelemetry-registry (0.2.0)
219
+ opentelemetry-registry (0.3.1)
200
220
  opentelemetry-api (~> 1.1)
201
- opentelemetry-sdk (1.2.1)
221
+ opentelemetry-sdk (1.5.0)
202
222
  opentelemetry-api (~> 1.1)
203
- opentelemetry-common (~> 0.19.3)
223
+ opentelemetry-common (~> 0.20)
204
224
  opentelemetry-registry (~> 0.2)
205
225
  opentelemetry-semantic_conventions
206
- opentelemetry-semantic_conventions (1.8.0)
226
+ opentelemetry-semantic_conventions (1.10.1)
207
227
  opentelemetry-api (~> 1.0)
208
228
  parallel (1.23.0)
209
229
  parser (3.2.2.3)
@@ -215,25 +235,27 @@ GEM
215
235
  regexp_parser (2.8.1)
216
236
  rexml (3.2.8)
217
237
  strscan (>= 3.0.9)
218
- rubocop (1.50.2)
238
+ rubocop (1.55.1)
219
239
  json (~> 2.3)
240
+ language_server-protocol (>= 3.17.0)
220
241
  parallel (~> 1.10)
221
- parser (>= 3.2.0.0)
242
+ parser (>= 3.2.2.3)
222
243
  rainbow (>= 2.2.2, < 4.0)
223
244
  regexp_parser (>= 1.8, < 3.0)
224
245
  rexml (>= 3.2.5, < 4.0)
225
- rubocop-ast (>= 1.28.0, < 2.0)
246
+ rubocop-ast (>= 1.28.1, < 2.0)
226
247
  ruby-progressbar (~> 1.7)
227
248
  unicode-display_width (>= 2.4.0, < 3.0)
228
249
  rubocop-ast (1.29.0)
229
250
  parser (>= 3.2.1.0)
230
251
  ruby-progressbar (1.13.0)
231
- ruby2_keywords (0.0.5)
232
252
  strscan (3.1.0)
233
253
  unicode-display_width (2.4.2)
234
254
 
235
255
  PLATFORMS
236
- ruby
256
+ arm64-darwin-22
257
+ arm64-darwin-23
258
+ x86_64-linux
237
259
 
238
260
  DEPENDENCIES
239
261
  highlight_io!
@@ -242,4 +264,4 @@ DEPENDENCIES
242
264
  rubocop
243
265
 
244
266
  BUNDLED WITH
245
- 2.4.22
267
+ 2.2.3
data/highlight.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.summary = 'The Highlight SDK for Ruby'
10
10
  spec.homepage = 'https://www.highlight.io'
11
11
  spec.license = 'MIT'
12
- spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
12
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.0.0')
13
13
 
14
14
  spec.metadata['homepage_uri'] = spec.homepage
15
15
 
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.add_runtime_dependency 'grpc', '~> 1.52'
26
- spec.add_runtime_dependency 'opentelemetry-exporter-otlp', '~> 0.24.0'
27
- spec.add_runtime_dependency 'opentelemetry-instrumentation-all', '~> 0.32.0'
28
- spec.add_runtime_dependency 'opentelemetry-sdk', '~> 1.2'
29
- spec.add_runtime_dependency 'opentelemetry-semantic_conventions', '~> 1.8.0'
25
+ spec.add_runtime_dependency 'grpc', '~> 1.65'
26
+ spec.add_runtime_dependency 'opentelemetry-exporter-otlp', '~> 0.28.1'
27
+ spec.add_runtime_dependency 'opentelemetry-instrumentation-all', '~> 0.62.1'
28
+ spec.add_runtime_dependency 'opentelemetry-sdk', '~> 1.5.0'
29
+ spec.add_runtime_dependency 'opentelemetry-semantic_conventions', '~> 1.10.1'
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module Highlight
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  end
data/lib/highlight.rb CHANGED
@@ -2,9 +2,42 @@ require 'opentelemetry/sdk'
2
2
  require 'opentelemetry/exporter/otlp'
3
3
  require 'opentelemetry/instrumentation/all'
4
4
  require 'opentelemetry/semantic_conventions'
5
+ require 'date'
6
+ require 'json'
5
7
  require 'logger'
8
+ require 'securerandom'
6
9
 
7
10
  module Highlight
11
+ HighlightHeaders = Struct.new('HighlightHeaders', :session_id, :request_id)
12
+
13
+ module Tracing
14
+ class BaggageSpanProcessor < OpenTelemetry::SDK::Trace::SpanProcessor
15
+ def on_start(span, parent_context)
16
+ span.add_attributes(OpenTelemetry::Baggage.values(context: parent_context))
17
+ end
18
+ end
19
+ end
20
+
21
+ def self.start_span(name, attrs = {}, &block)
22
+ if block_given?
23
+ H.instance.start_span(name, attrs, &block)
24
+ else
25
+ H.instance.start_span(name, attrs) { |_| }
26
+ end
27
+ end
28
+
29
+ def self.log(level, message, attrs = {})
30
+ H.instance.record_log(nil, nil, level, message, attrs)
31
+ end
32
+
33
+ def self.exception(error, attrs = {})
34
+ H.instance.record_exception(error, attrs)
35
+ end
36
+
37
+ def self.traceparent_meta
38
+ Helpers.traceparent_meta
39
+ end
40
+
8
41
  class H
9
42
  HIGHLIGHT_REQUEST_HEADER = 'X-Highlight-Request'.freeze
10
43
  OTLP_HTTP = 'https://otel.highlight.io:4318'.freeze
@@ -29,16 +62,28 @@ module Highlight
29
62
  @otlp_endpoint = otlp_endpoint
30
63
 
31
64
  OpenTelemetry::SDK.configure do |c|
32
- c.add_span_processor(OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.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
36
- ))
65
+ c.add_span_processor(Highlight::Tracing::BaggageSpanProcessor.new)
66
+
67
+ c.add_span_processor(
68
+ OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
69
+ OpenTelemetry::Exporter::OTLP::Exporter.new(
70
+ endpoint: "#{@otlp_endpoint}/v1/traces",
71
+ compression: 'gzip'
72
+ ),
73
+ schedule_delay: 1000,
74
+ max_export_batch_size: 128,
75
+ max_queue_size: 1024
76
+ )
77
+ )
37
78
 
38
79
  c.resource = OpenTelemetry::SDK::Resources::Resource.create(
80
+ HIGHLIGHT_PROJECT_ATTRIBUTE => @project_id,
81
+ OpenTelemetry::SemanticConventions::Resource::SERVICE_NAME => environment,
39
82
  OpenTelemetry::SemanticConventions::Resource::DEPLOYMENT_ENVIRONMENT => environment
40
83
  )
41
84
 
85
+ c.use_all
86
+
42
87
  yield c if block_given?
43
88
  end
44
89
 
@@ -46,29 +91,50 @@ module Highlight
46
91
  @tracer = @tracer_provider.tracer('highlight-tracer')
47
92
  end
48
93
 
94
+ def initialized?
95
+ defined?(@tracer_provider)
96
+ end
97
+
49
98
  def flush
99
+ return unless initialized?
100
+
50
101
  @tracer_provider.force_flush
51
102
  end
52
103
 
53
- def trace(session_id, request_id, attrs = {})
54
- @tracer.in_span('highlight-ctx', attributes: {
55
- HIGHLIGHT_PROJECT_ATTRIBUTE => @project_id,
56
- HIGHLIGHT_SESSION_ATTRIBUTE => session_id,
57
- HIGHLIGHT_TRACE_ATTRIBUTE => request_id
58
- }.merge(attrs).compact) do |_span|
59
- yield
104
+ def trace(session_id, request_id, attrs = {}, name: 'highlight.span', &block)
105
+ return unless initialized?
106
+
107
+ # Passed along by the BaggageSpanProcessor to child spans as attributes.
108
+ ctx = OpenTelemetry::Baggage.set_value(HIGHLIGHT_SESSION_ATTRIBUTE, session_id || '')
109
+ ctx = OpenTelemetry::Baggage.set_value(HIGHLIGHT_TRACE_ATTRIBUTE, request_id || '', context: ctx)
110
+
111
+ OpenTelemetry::Context.with_current(ctx) do
112
+ start_span(name, attrs, &block)
113
+ end
114
+ end
115
+
116
+ def start_span(name, attrs = {}, &block)
117
+ return unless initialized?
118
+
119
+ if block_given?
120
+ @tracer.in_span(name, attributes: attrs, &block)
121
+ else
122
+ @tracer.in_span(name, attributes: attrs) { |_| }
60
123
  end
61
124
  end
62
125
 
63
126
  def record_exception(e, attrs = {})
127
+ return unless initialized?
128
+
64
129
  span = OpenTelemetry::Trace.current_span
65
130
  return unless span
66
131
 
67
132
  span.record_exception(e, attributes: attrs)
68
133
  end
69
134
 
70
- # rubocop:disable Metrics/AbcSize
71
135
  def record_log(session_id, request_id, level, message, attrs = {})
136
+ return unless initialized?
137
+
72
138
  caller_info = caller[0].split(':', 3)
73
139
  function = caller_info[2]
74
140
  if function
@@ -76,8 +142,8 @@ module Highlight
76
142
  function.delete_prefix!('in `')
77
143
  function.delete_suffix!('"')
78
144
  end
79
- @tracer.in_span('highlight-ctx', attributes: {
80
- HIGHLIGHT_PROJECT_ATTRIBUTE => @project_id,
145
+
146
+ @tracer.in_span('highlight.log', attributes: {
81
147
  HIGHLIGHT_SESSION_ATTRIBUTE => session_id,
82
148
  HIGHLIGHT_TRACE_ATTRIBUTE => request_id
83
149
  }.compact) do |span|
@@ -91,13 +157,13 @@ module Highlight
91
157
  }.merge(attrs))
92
158
  end
93
159
  end
94
- # rubocop:enable Metrics/AbcSize
95
160
 
96
- HighlightHeaders = Struct.new('HighlightHeaders', :session_id, :request_id)
97
161
  def self.parse_headers(headers)
98
162
  if headers && headers[HIGHLIGHT_REQUEST_HEADER]
99
163
  session_id, request_id = headers[HIGHLIGHT_REQUEST_HEADER].split('/')
100
- return HighlightHeaders.new(session_id, request_id)
164
+ traceparent = headers['traceparent']
165
+ trace_id = traceparent&.split('-')&.second || request_id
166
+ return HighlightHeaders.new(session_id, trace_id)
101
167
  end
102
168
  HighlightHeaders.new(nil, nil)
103
169
  end
@@ -120,13 +186,23 @@ module Highlight
120
186
  'UNKNOWN'
121
187
  end
122
188
  end
189
+
190
+ private
191
+
192
+ def trace_id_from_headers(headers)
193
+ headers.traceparent&.split('-')&.first
194
+ end
123
195
  end
124
196
 
125
197
  class Logger < ::Logger
126
- def add(severity, message = nil, progname = nil)
127
- # https://github.com/ruby/logger/blob/master/lib/logger.rb
198
+ def initialize(*args)
199
+ super
200
+ @local_level = nil
201
+ end
202
+
203
+ def add(severity, message = nil, progname = nil, &block)
128
204
  severity ||= UNKNOWN
129
- return true if @logdev.nil? or severity < level # rubocop:disable Style/AndOr
205
+ return true if @logdev.nil? || severity < level
130
206
 
131
207
  progname = @progname if progname.nil?
132
208
  if message.nil?
@@ -137,17 +213,76 @@ module Highlight
137
213
  progname = @progname
138
214
  end
139
215
  end
140
- super
216
+ super(severity, message, progname, &block)
141
217
  H.instance.record_log(nil, nil, severity, message)
142
218
  end
143
219
  end
144
220
 
145
221
  module Integrations
146
222
  module Rails
223
+ def self.included(base)
224
+ base.extend(ClassMethods)
225
+ base.helper_method(:highlight_headers)
226
+ end
227
+
147
228
  def with_highlight_context(&block)
148
- highlight_headers = H.parse_headers(request.headers)
149
- H.instance.trace(highlight_headers.session_id, highlight_headers.request_id, &block)
229
+ set_highlight_headers
230
+ H.instance.trace(highlight_headers.session_id, highlight_headers.request_id,
231
+ name: "#{request.method.upcase} #{request.path}", &block)
150
232
  end
233
+
234
+ private
235
+
236
+ def set_highlight_headers
237
+ @highlight_headers = H.parse_headers(request.headers)
238
+ return unless @highlight_headers.session_id.nil?
239
+
240
+ session_id = request.cookies['sessionID'].presence || SecureRandom.alphanumeric(28)
241
+
242
+ session_data_key = "sessionData_#{session_id}"
243
+ @session_data = request.cookies[session_data_key] || {
244
+ sessionSecureID: session_id,
245
+ projectID: @project_id,
246
+ payloadID: 1,
247
+ sessionStartTime: DateTime.now.strftime('%Q'),
248
+ lastPushTime: DateTime.now.strftime('%Q')
249
+ }
250
+
251
+ cookies[:sessionID] = {
252
+ value: session_id,
253
+ expires: 15.minutes.from_now
254
+ }
255
+ cookies[session_data_key] = {
256
+ value: @session_data.to_json,
257
+ expires: 15.minutes.from_now
258
+ }
259
+
260
+ @highlight_headers = HighlightHeaders.new(session_id, nil)
261
+ end
262
+
263
+ def highlight_headers
264
+ @highlight_headers
265
+ end
266
+
267
+ module ClassMethods
268
+ end
269
+ end
270
+ end
271
+
272
+ module Helpers
273
+ if defined?(ActionView)
274
+ include ActionView::Helpers
275
+ extend ActionView::Helpers::TagHelper
276
+ end
277
+
278
+ def self.traceparent_meta
279
+ current_trace = OpenTelemetry::Trace.current_span
280
+ trace_id = current_trace&.context&.trace_id
281
+ span_id = current_trace&.context&.span_id
282
+ hex_trace_id = trace_id&.unpack1('H*') || '00000000000000000000000000000000'
283
+ hex_span_id = span_id&.unpack1('H*') || '0000000000000000'
284
+
285
+ tag(:meta, name: 'traceparent', content: "00-#{hex_trace_id}-#{hex_span_id}-01")
151
286
  end
152
287
  end
153
288
  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.2.2
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Highlight
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -16,70 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.52'
19
+ version: '1.65'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.52'
26
+ version: '1.65'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: opentelemetry-exporter-otlp
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.24.0
33
+ version: 0.28.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.24.0
40
+ version: 0.28.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opentelemetry-instrumentation-all
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.32.0
47
+ version: 0.62.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.32.0
54
+ version: 0.62.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: opentelemetry-sdk
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.2'
61
+ version: 1.5.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.2'
68
+ version: 1.5.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: opentelemetry-semantic_conventions
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.8.0
75
+ version: 1.10.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.8.0
82
+ version: 1.10.1
83
83
  description:
84
84
  email:
85
85
  - support@highlight.io
@@ -114,14 +114,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 2.6.0
117
+ version: 3.0.0
118
118
  required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.0.3.1
124
+ rubygems_version: 3.5.11
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: The Highlight SDK for Ruby