highlight_io 0.2.1 → 0.3.0

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: ce73dd45dc718a3763e06ad6168954ff402294f28ad7b99a3ced2234b8d878d0
4
- data.tar.gz: 9c37d1382204c7e542a525a88e6ec02953bac04e11b11771532f8e3039339a9e
3
+ metadata.gz: 2adbe799337d2c59b751869b529af2a39efe40c2512bc345b133ffbd3e05eb51
4
+ data.tar.gz: 24c098762842080dbc45261fe96deb42e1da7da592839eda378a99f22866718c
5
5
  SHA512:
6
- metadata.gz: ffd101b0284c9854b1d54b3f95f852d440609ab709faebd650cd1cafd67031fe97f0230b939b21981fc6a6c1f58a5e830daf214aa7ff71d374566a64767dc43d
7
- data.tar.gz: c8437f01919ad43ad20f35a5c3a0f59470baf7acca5708834652dbba88d8008794e4c50768777b2f46b287e496c24c83141a1ad48f870b94e836c554b855a9be
6
+ metadata.gz: 1d2796d575ba7938606af965ba98f72a4dc41d9672d01517e26550fb86e7333233bae97ec6ed769a429b2badd5b7c69fc25c9338205130b6f6185e2342ce451d
7
+ data.tar.gz: 12502c3c4dce422ca34bb76201dbdb2b3f5de1642e3e1eecaa3f4a546c73eb88091e955e018dab06c44f3ee4e2cd0a2607d50b853a0348f7c0c1c211f10ecd4c
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
@@ -12,3 +12,9 @@ Metrics/MethodLength:
12
12
 
13
13
  Naming/MethodParameterName:
14
14
  Enabled: false
15
+
16
+ Metrics/AbcSize:
17
+ Enabled: false
18
+
19
+ Metrics/ClassLength:
20
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -15,3 +15,7 @@
15
15
  ## 0.2.1
16
16
 
17
17
  - Ensure `message` on logs is always a string.
18
+
19
+ ## 0.2.2
20
+
21
+ - Fix duplicate errors recorded on traces.
data/Gemfile.lock CHANGED
@@ -1,209 +1,229 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- highlight_io (0.2.1)
4
+ highlight_io (0.3.0)
5
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)
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.57.0)
19
- google-protobuf (~> 3.23)
15
+ google-protobuf (3.25.4-arm64-darwin)
16
+ google-protobuf (3.25.4-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)
@@ -213,25 +233,28 @@ GEM
213
233
  rainbow (3.1.1)
214
234
  rake (12.3.3)
215
235
  regexp_parser (2.8.1)
216
- rexml (3.2.6)
217
- rubocop (1.50.2)
236
+ rexml (3.2.8)
237
+ strscan (>= 3.0.9)
238
+ rubocop (1.55.1)
218
239
  json (~> 2.3)
240
+ language_server-protocol (>= 3.17.0)
219
241
  parallel (~> 1.10)
220
- parser (>= 3.2.0.0)
242
+ parser (>= 3.2.2.3)
221
243
  rainbow (>= 2.2.2, < 4.0)
222
244
  regexp_parser (>= 1.8, < 3.0)
223
245
  rexml (>= 3.2.5, < 4.0)
224
- rubocop-ast (>= 1.28.0, < 2.0)
246
+ rubocop-ast (>= 1.28.1, < 2.0)
225
247
  ruby-progressbar (~> 1.7)
226
248
  unicode-display_width (>= 2.4.0, < 3.0)
227
249
  rubocop-ast (1.29.0)
228
250
  parser (>= 3.2.1.0)
229
251
  ruby-progressbar (1.13.0)
230
- ruby2_keywords (0.0.5)
252
+ strscan (3.1.0)
231
253
  unicode-display_width (2.4.2)
232
254
 
233
255
  PLATFORMS
234
- ruby
256
+ arm64-darwin-22
257
+ x86_64-linux
235
258
 
236
259
  DEPENDENCIES
237
260
  highlight_io!
@@ -240,4 +263,4 @@ DEPENDENCIES
240
263
  rubocop
241
264
 
242
265
  BUNDLED WITH
243
- 2.4.22
266
+ 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
 
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ['lib']
24
24
 
25
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'
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.1'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
data/lib/highlight.rb CHANGED
@@ -2,9 +2,30 @@ 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
+
8
29
  class H
9
30
  HIGHLIGHT_REQUEST_HEADER = 'X-Highlight-Request'.freeze
10
31
  OTLP_HTTP = 'https://otel.highlight.io:4318'.freeze
@@ -29,16 +50,28 @@ module Highlight
29
50
  @otlp_endpoint = otlp_endpoint
30
51
 
31
52
  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
- ))
53
+ c.add_span_processor(Highlight::Tracing::BaggageSpanProcessor.new)
54
+
55
+ c.add_span_processor(
56
+ OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
57
+ OpenTelemetry::Exporter::OTLP::Exporter.new(
58
+ endpoint: "#{@otlp_endpoint}/v1/traces",
59
+ compression: 'gzip'
60
+ ),
61
+ schedule_delay: 1000,
62
+ max_export_batch_size: 128,
63
+ max_queue_size: 1024
64
+ )
65
+ )
37
66
 
38
67
  c.resource = OpenTelemetry::SDK::Resources::Resource.create(
68
+ HIGHLIGHT_PROJECT_ATTRIBUTE => @project_id,
69
+ OpenTelemetry::SemanticConventions::Resource::SERVICE_NAME => environment,
39
70
  OpenTelemetry::SemanticConventions::Resource::DEPLOYMENT_ENVIRONMENT => environment
40
71
  )
41
72
 
73
+ c.use_all
74
+
42
75
  yield c if block_given?
43
76
  end
44
77
 
@@ -46,32 +79,50 @@ module Highlight
46
79
  @tracer = @tracer_provider.tracer('highlight-tracer')
47
80
  end
48
81
 
82
+ def initialized?
83
+ defined?(@tracer_provider)
84
+ end
85
+
49
86
  def flush
87
+ return unless initialized?
88
+
50
89
  @tracer_provider.force_flush
51
90
  end
52
91
 
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
60
- rescue StandardError => e
61
- record_exception(e)
62
- raise
92
+ def trace(session_id, request_id, attrs = {}, name: 'highlight.span', &block)
93
+ return unless initialized?
94
+
95
+ # Passed along by the BaggageSpanProcessor to child spans as attributes.
96
+ ctx = OpenTelemetry::Baggage.set_value(HIGHLIGHT_SESSION_ATTRIBUTE, session_id || '')
97
+ ctx = OpenTelemetry::Baggage.set_value(HIGHLIGHT_TRACE_ATTRIBUTE, request_id || '', context: ctx)
98
+
99
+ OpenTelemetry::Context.with_current(ctx) do
100
+ start_span(name, attrs, &block)
101
+ end
102
+ end
103
+
104
+ def start_span(name, attrs = {}, &block)
105
+ return unless initialized?
106
+
107
+ if block_given?
108
+ @tracer.in_span(name, attributes: attrs, &block)
109
+ else
110
+ @tracer.in_span(name, attributes: attrs) { |_| }
63
111
  end
64
112
  end
65
113
 
66
114
  def record_exception(e, attrs = {})
115
+ return unless initialized?
116
+
67
117
  span = OpenTelemetry::Trace.current_span
68
118
  return unless span
69
119
 
70
120
  span.record_exception(e, attributes: attrs)
71
121
  end
72
122
 
73
- # rubocop:disable Metrics/AbcSize
74
123
  def record_log(session_id, request_id, level, message, attrs = {})
124
+ return unless initialized?
125
+
75
126
  caller_info = caller[0].split(':', 3)
76
127
  function = caller_info[2]
77
128
  if function
@@ -79,8 +130,7 @@ module Highlight
79
130
  function.delete_prefix!('in `')
80
131
  function.delete_suffix!('"')
81
132
  end
82
- @tracer.in_span('highlight-ctx', attributes: {
83
- HIGHLIGHT_PROJECT_ATTRIBUTE => @project_id,
133
+ @tracer.in_span('highlight.log', attributes: {
84
134
  HIGHLIGHT_SESSION_ATTRIBUTE => session_id,
85
135
  HIGHLIGHT_TRACE_ATTRIBUTE => request_id
86
136
  }.compact) do |span|
@@ -94,13 +144,13 @@ module Highlight
94
144
  }.merge(attrs))
95
145
  end
96
146
  end
97
- # rubocop:enable Metrics/AbcSize
98
147
 
99
- HighlightHeaders = Struct.new('HighlightHeaders', :session_id, :request_id)
100
148
  def self.parse_headers(headers)
101
149
  if headers && headers[HIGHLIGHT_REQUEST_HEADER]
102
150
  session_id, request_id = headers[HIGHLIGHT_REQUEST_HEADER].split('/')
103
- return HighlightHeaders.new(session_id, request_id)
151
+ traceparent = headers['traceparent']
152
+ trace_id = traceparent&.split('-')&.second || request_id
153
+ return HighlightHeaders.new(session_id, trace_id)
104
154
  end
105
155
  HighlightHeaders.new(nil, nil)
106
156
  end
@@ -123,13 +173,23 @@ module Highlight
123
173
  'UNKNOWN'
124
174
  end
125
175
  end
176
+
177
+ private
178
+
179
+ def trace_id_from_headers(headers)
180
+ headers.traceparent&.split('-')&.first
181
+ end
126
182
  end
127
183
 
128
184
  class Logger < ::Logger
129
- def add(severity, message = nil, progname = nil)
130
- # https://github.com/ruby/logger/blob/master/lib/logger.rb
185
+ def initialize(*args)
186
+ super
187
+ @local_level = nil
188
+ end
189
+
190
+ def add(severity, message = nil, progname = nil, &block)
131
191
  severity ||= UNKNOWN
132
- return true if @logdev.nil? or severity < level # rubocop:disable Style/AndOr
192
+ return true if @logdev.nil? || severity < level
133
193
 
134
194
  progname = @progname if progname.nil?
135
195
  if message.nil?
@@ -140,16 +200,58 @@ module Highlight
140
200
  progname = @progname
141
201
  end
142
202
  end
143
- super
203
+ super(severity, message, progname, &block)
144
204
  H.instance.record_log(nil, nil, severity, message)
145
205
  end
146
206
  end
147
207
 
148
208
  module Integrations
149
209
  module Rails
210
+ def self.included(base)
211
+ base.extend(ClassMethods)
212
+ base.helper_method(:highlight_headers)
213
+ end
214
+
150
215
  def with_highlight_context(&block)
151
- highlight_headers = H.parse_headers(request.headers)
152
- H.instance.trace(highlight_headers.session_id, highlight_headers.request_id, &block)
216
+ set_highlight_headers
217
+ H.instance.trace(highlight_headers.session_id, highlight_headers.request_id,
218
+ name: "#{request.method.upcase} #{request.path}", &block)
219
+ end
220
+
221
+ private
222
+
223
+ def set_highlight_headers
224
+ @highlight_headers = H.parse_headers(request.headers)
225
+ return unless @highlight_headers.session_id.nil?
226
+
227
+ session_id = request.cookies['sessionID'].presence || SecureRandom.alphanumeric(28)
228
+
229
+ session_data_key = "sessionData_#{session_id}"
230
+ @session_data = request.cookies[session_data_key] || {
231
+ sessionSecureID: session_id,
232
+ projectID: @project_id,
233
+ payloadID: 1,
234
+ sessionStartTime: DateTime.now.strftime('%Q'),
235
+ lastPushTime: DateTime.now.strftime('%Q')
236
+ }
237
+
238
+ cookies[:sessionID] = {
239
+ value: session_id,
240
+ expires: 15.minutes.from_now
241
+ }
242
+ cookies[session_data_key] = {
243
+ value: @session_data.to_json,
244
+ expires: 15.minutes.from_now
245
+ }
246
+
247
+ @highlight_headers = HighlightHeaders.new(session_id, nil)
248
+ end
249
+
250
+ def highlight_headers
251
+ @highlight_headers
252
+ end
253
+
254
+ module ClassMethods
153
255
  end
154
256
  end
155
257
  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.1
4
+ version: 0.3.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-06-19 00:00:00.000000000 Z
11
+ date: 2024-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -30,56 +30,56 @@ dependencies:
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