hypertrace-agent 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: cd902302c28208a7f321249b2b10a682d191e0fcd5109832bf26096ab9cc89e7
4
+ data.tar.gz: ad3be3804d501059bb320e4c673d85b1cd8668973d9e322b629ecbe1ac16e5db
5
+ SHA512:
6
+ metadata.gz: 11acc90ba4879bc17c3f790d518356407a4acc64a232f7122bf61843d8760ba25d4029d9a8ff537d0ee81e3e49eb6eca8baf471dc8f26dd1c826f7feaa0e5cde
7
+ data.tar.gz: bac8741ffccfa66832fac4bf768a700228b2f4ed84b672c0f1052b354a0a096335179bfd7278ee062edf9c0ba9c6283d04c05bee78a91a88113ca6836e9af5a3
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ rubyagent
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-3.1.0
data/Gemfile ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in rubyagent.gemspec
6
+ gemspec
7
+
8
+ gem "mysql2", "~> 0.5.2"
9
+ gem "faraday", "~> 2.5.2"
10
+ gem "rails", "~> 6.1.3"
11
+ gem 'rest-client', "~> 2.0.0"
12
+ gem 'pg', "~> 1.4.3"
13
+ gem 'http', "~> 5.1.0"
14
+ gem "mongo", "~> 2"
15
+ gem "puma", "~> 5.2.2"
16
+ gem "nio4r", "~> 2.0"
17
+ gem "rake", "~> 13.0"
18
+ gem "rspec", "~> 3.0"
19
+ gem "rubocop", "~> 1.21"
20
+ gem "rack-test", "~> 1.1"
21
+ gem "sinatra", "~> 2.1"
data/Gemfile.lock ADDED
@@ -0,0 +1,346 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ hypertrace-agent (0.1.0)
5
+ google-protobuf (= 3.21.5)
6
+ opentelemetry-api (= 1.0.2)
7
+ opentelemetry-exporter-otlp (= 0.21.1)
8
+ opentelemetry-exporter-zipkin (= 0.20.0)
9
+ opentelemetry-instrumentation-faraday (= 0.21.0)
10
+ opentelemetry-instrumentation-http (= 0.20.0)
11
+ opentelemetry-instrumentation-mongo (= 0.20.0)
12
+ opentelemetry-instrumentation-mysql2 (= 0.21.0)
13
+ opentelemetry-instrumentation-net_http (= 0.20.0)
14
+ opentelemetry-instrumentation-pg (= 0.21.0)
15
+ opentelemetry-instrumentation-rails (= 0.22.0)
16
+ opentelemetry-instrumentation-restclient (= 0.20.0)
17
+ opentelemetry-instrumentation-sinatra (= 0.20.0)
18
+ opentelemetry-propagator-b3 (= 0.20.0)
19
+ opentelemetry-sdk (= 1.1.0)
20
+
21
+ GEM
22
+ remote: https://rubygems.org/
23
+ specs:
24
+ actioncable (6.1.6.1)
25
+ actionpack (= 6.1.6.1)
26
+ activesupport (= 6.1.6.1)
27
+ nio4r (~> 2.0)
28
+ websocket-driver (>= 0.6.1)
29
+ actionmailbox (6.1.6.1)
30
+ actionpack (= 6.1.6.1)
31
+ activejob (= 6.1.6.1)
32
+ activerecord (= 6.1.6.1)
33
+ activestorage (= 6.1.6.1)
34
+ activesupport (= 6.1.6.1)
35
+ mail (>= 2.7.1)
36
+ actionmailer (6.1.6.1)
37
+ actionpack (= 6.1.6.1)
38
+ actionview (= 6.1.6.1)
39
+ activejob (= 6.1.6.1)
40
+ activesupport (= 6.1.6.1)
41
+ mail (~> 2.5, >= 2.5.4)
42
+ rails-dom-testing (~> 2.0)
43
+ actionpack (6.1.6.1)
44
+ actionview (= 6.1.6.1)
45
+ activesupport (= 6.1.6.1)
46
+ rack (~> 2.0, >= 2.0.9)
47
+ rack-test (>= 0.6.3)
48
+ rails-dom-testing (~> 2.0)
49
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
50
+ actiontext (6.1.6.1)
51
+ actionpack (= 6.1.6.1)
52
+ activerecord (= 6.1.6.1)
53
+ activestorage (= 6.1.6.1)
54
+ activesupport (= 6.1.6.1)
55
+ nokogiri (>= 1.8.5)
56
+ actionview (6.1.6.1)
57
+ activesupport (= 6.1.6.1)
58
+ builder (~> 3.1)
59
+ erubi (~> 1.4)
60
+ rails-dom-testing (~> 2.0)
61
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
62
+ activejob (6.1.6.1)
63
+ activesupport (= 6.1.6.1)
64
+ globalid (>= 0.3.6)
65
+ activemodel (6.1.6.1)
66
+ activesupport (= 6.1.6.1)
67
+ activerecord (6.1.6.1)
68
+ activemodel (= 6.1.6.1)
69
+ activesupport (= 6.1.6.1)
70
+ activestorage (6.1.6.1)
71
+ actionpack (= 6.1.6.1)
72
+ activejob (= 6.1.6.1)
73
+ activerecord (= 6.1.6.1)
74
+ activesupport (= 6.1.6.1)
75
+ marcel (~> 1.0)
76
+ mini_mime (>= 1.1.0)
77
+ activesupport (6.1.6.1)
78
+ concurrent-ruby (~> 1.0, >= 1.0.2)
79
+ i18n (>= 1.6, < 2)
80
+ minitest (>= 5.1)
81
+ tzinfo (~> 2.0)
82
+ zeitwerk (~> 2.3)
83
+ addressable (2.8.0)
84
+ public_suffix (>= 2.0.2, < 5.0)
85
+ ast (2.4.2)
86
+ bson (4.15.0)
87
+ builder (3.2.4)
88
+ concurrent-ruby (1.1.10)
89
+ crass (1.0.6)
90
+ diff-lcs (1.5.0)
91
+ domain_name (0.5.20190701)
92
+ unf (>= 0.0.5, < 1.0.0)
93
+ erubi (1.11.0)
94
+ faraday (2.5.2)
95
+ faraday-net_http (>= 2.0, < 3.1)
96
+ ruby2_keywords (>= 0.0.4)
97
+ faraday-net_http (3.0.0)
98
+ ffi (1.15.5)
99
+ ffi-compiler (1.0.1)
100
+ ffi (>= 1.0.0)
101
+ rake
102
+ globalid (1.0.0)
103
+ activesupport (>= 5.0)
104
+ google-protobuf (3.21.5-x86_64-darwin)
105
+ google-protobuf (3.21.5-x86_64-linux)
106
+ http (5.1.0)
107
+ addressable (~> 2.8)
108
+ http-cookie (~> 1.0)
109
+ http-form_data (~> 2.2)
110
+ llhttp-ffi (~> 0.4.0)
111
+ http-cookie (1.0.5)
112
+ domain_name (~> 0.5)
113
+ http-form_data (2.3.0)
114
+ i18n (1.12.0)
115
+ concurrent-ruby (~> 1.0)
116
+ json (2.6.2)
117
+ llhttp-ffi (0.4.0)
118
+ ffi-compiler (~> 1.0)
119
+ rake (~> 13.0)
120
+ loofah (2.18.0)
121
+ crass (~> 1.0.2)
122
+ nokogiri (>= 1.5.9)
123
+ mail (2.7.1)
124
+ mini_mime (>= 0.1.1)
125
+ marcel (1.0.2)
126
+ method_source (1.0.0)
127
+ mime-types (3.4.1)
128
+ mime-types-data (~> 3.2015)
129
+ mime-types-data (3.2022.0105)
130
+ mini_mime (1.1.2)
131
+ minitest (5.16.2)
132
+ mongo (2.18.1)
133
+ bson (>= 4.14.1, < 5.0.0)
134
+ mustermann (2.0.2)
135
+ ruby2_keywords (~> 0.0.1)
136
+ mysql2 (0.5.4)
137
+ netrc (0.11.0)
138
+ nio4r (2.5.8)
139
+ nokogiri (1.13.8-x86_64-darwin)
140
+ racc (~> 1.4)
141
+ nokogiri (1.13.8-x86_64-linux)
142
+ racc (~> 1.4)
143
+ opentelemetry-api (1.0.2)
144
+ opentelemetry-common (0.19.6)
145
+ opentelemetry-api (~> 1.0)
146
+ opentelemetry-exporter-otlp (0.21.1)
147
+ google-protobuf (~> 3.7)
148
+ opentelemetry-api (~> 1.0)
149
+ opentelemetry-common (~> 0.19.3)
150
+ opentelemetry-sdk (~> 1.0)
151
+ opentelemetry-exporter-zipkin (0.20.0)
152
+ opentelemetry-api (~> 1.0)
153
+ opentelemetry-common (~> 0.19.6)
154
+ opentelemetry-sdk (~> 1.0)
155
+ opentelemetry-semantic_conventions
156
+ opentelemetry-instrumentation-action_pack (0.2.0)
157
+ opentelemetry-api (~> 1.0)
158
+ opentelemetry-instrumentation-base (~> 0.21.0)
159
+ opentelemetry-instrumentation-rack (~> 0.21.0)
160
+ opentelemetry-instrumentation-action_view (0.3.0)
161
+ opentelemetry-api (~> 1.0)
162
+ opentelemetry-instrumentation-active_support (~> 0.1)
163
+ opentelemetry-instrumentation-base (~> 0.20)
164
+ opentelemetry-instrumentation-active_record (0.4.0)
165
+ opentelemetry-api (~> 1.0)
166
+ opentelemetry-instrumentation-base (~> 0.21.0)
167
+ ruby2_keywords
168
+ opentelemetry-instrumentation-active_support (0.2.0)
169
+ opentelemetry-api (~> 1.0)
170
+ opentelemetry-instrumentation-base (~> 0.21.0)
171
+ opentelemetry-instrumentation-base (0.21.0)
172
+ opentelemetry-api (~> 1.0)
173
+ opentelemetry-registry (~> 0.1)
174
+ opentelemetry-instrumentation-faraday (0.21.0)
175
+ opentelemetry-api (~> 1.0)
176
+ opentelemetry-common (~> 0.19.3)
177
+ opentelemetry-instrumentation-base (~> 0.21.0)
178
+ opentelemetry-instrumentation-http (0.20.0)
179
+ opentelemetry-api (~> 1.0)
180
+ opentelemetry-instrumentation-base (~> 0.21.0)
181
+ opentelemetry-instrumentation-mongo (0.20.0)
182
+ opentelemetry-api (~> 1.0)
183
+ opentelemetry-instrumentation-base (~> 0.21.0)
184
+ opentelemetry-instrumentation-mysql2 (0.21.0)
185
+ opentelemetry-api (~> 1.0)
186
+ opentelemetry-instrumentation-base (~> 0.21.0)
187
+ opentelemetry-instrumentation-net_http (0.20.0)
188
+ opentelemetry-api (~> 1.0)
189
+ opentelemetry-common (~> 0.19.3)
190
+ opentelemetry-instrumentation-base (~> 0.21.0)
191
+ opentelemetry-instrumentation-pg (0.21.0)
192
+ opentelemetry-api (~> 1.0)
193
+ opentelemetry-instrumentation-base (~> 0.21.0)
194
+ opentelemetry-instrumentation-rack (0.21.0)
195
+ opentelemetry-api (~> 1.0)
196
+ opentelemetry-common (~> 0.19.3)
197
+ opentelemetry-instrumentation-base (~> 0.21.0)
198
+ opentelemetry-instrumentation-rails (0.22.0)
199
+ opentelemetry-api (~> 1.0)
200
+ opentelemetry-instrumentation-action_pack (~> 0.2.0)
201
+ opentelemetry-instrumentation-action_view (~> 0.3.0)
202
+ opentelemetry-instrumentation-active_record (~> 0.4.0)
203
+ opentelemetry-instrumentation-active_support (~> 0.2.0)
204
+ opentelemetry-instrumentation-base (~> 0.21.0)
205
+ opentelemetry-instrumentation-restclient (0.20.0)
206
+ opentelemetry-api (~> 1.0)
207
+ opentelemetry-common (~> 0.19.3)
208
+ opentelemetry-instrumentation-base (~> 0.21.0)
209
+ opentelemetry-instrumentation-sinatra (0.20.0)
210
+ opentelemetry-api (~> 1.0)
211
+ opentelemetry-common (~> 0.19.3)
212
+ opentelemetry-instrumentation-base (~> 0.21.0)
213
+ opentelemetry-propagator-b3 (0.20.0)
214
+ opentelemetry-api (~> 1.0)
215
+ opentelemetry-registry (0.1.0)
216
+ opentelemetry-api (~> 1.0.1)
217
+ opentelemetry-sdk (1.1.0)
218
+ opentelemetry-api (~> 1.0)
219
+ opentelemetry-common (~> 0.19.3)
220
+ opentelemetry-registry (~> 0.1)
221
+ opentelemetry-semantic_conventions
222
+ opentelemetry-semantic_conventions (1.8.0)
223
+ opentelemetry-api (~> 1.0)
224
+ parallel (1.22.1)
225
+ parser (3.1.2.0)
226
+ ast (~> 2.4.1)
227
+ pg (1.4.3)
228
+ public_suffix (4.0.7)
229
+ puma (5.2.2)
230
+ nio4r (~> 2.0)
231
+ racc (1.6.0)
232
+ rack (2.2.4)
233
+ rack-protection (2.2.2)
234
+ rack
235
+ rack-test (1.1.0)
236
+ rack (>= 1.0, < 3)
237
+ rails (6.1.6.1)
238
+ actioncable (= 6.1.6.1)
239
+ actionmailbox (= 6.1.6.1)
240
+ actionmailer (= 6.1.6.1)
241
+ actionpack (= 6.1.6.1)
242
+ actiontext (= 6.1.6.1)
243
+ actionview (= 6.1.6.1)
244
+ activejob (= 6.1.6.1)
245
+ activemodel (= 6.1.6.1)
246
+ activerecord (= 6.1.6.1)
247
+ activestorage (= 6.1.6.1)
248
+ activesupport (= 6.1.6.1)
249
+ bundler (>= 1.15.0)
250
+ railties (= 6.1.6.1)
251
+ sprockets-rails (>= 2.0.0)
252
+ rails-dom-testing (2.0.3)
253
+ activesupport (>= 4.2.0)
254
+ nokogiri (>= 1.6)
255
+ rails-html-sanitizer (1.4.3)
256
+ loofah (~> 2.3)
257
+ railties (6.1.6.1)
258
+ actionpack (= 6.1.6.1)
259
+ activesupport (= 6.1.6.1)
260
+ method_source
261
+ rake (>= 12.2)
262
+ thor (~> 1.0)
263
+ rainbow (3.1.1)
264
+ rake (13.0.6)
265
+ regexp_parser (2.5.0)
266
+ rest-client (2.0.2)
267
+ http-cookie (>= 1.0.2, < 2.0)
268
+ mime-types (>= 1.16, < 4.0)
269
+ netrc (~> 0.8)
270
+ rexml (3.2.5)
271
+ rspec (3.11.0)
272
+ rspec-core (~> 3.11.0)
273
+ rspec-expectations (~> 3.11.0)
274
+ rspec-mocks (~> 3.11.0)
275
+ rspec-core (3.11.0)
276
+ rspec-support (~> 3.11.0)
277
+ rspec-expectations (3.11.0)
278
+ diff-lcs (>= 1.2.0, < 2.0)
279
+ rspec-support (~> 3.11.0)
280
+ rspec-mocks (3.11.1)
281
+ diff-lcs (>= 1.2.0, < 2.0)
282
+ rspec-support (~> 3.11.0)
283
+ rspec-support (3.11.0)
284
+ rubocop (1.32.0)
285
+ json (~> 2.3)
286
+ parallel (~> 1.10)
287
+ parser (>= 3.1.0.0)
288
+ rainbow (>= 2.2.2, < 4.0)
289
+ regexp_parser (>= 1.8, < 3.0)
290
+ rexml (>= 3.2.5, < 4.0)
291
+ rubocop-ast (>= 1.19.1, < 2.0)
292
+ ruby-progressbar (~> 1.7)
293
+ unicode-display_width (>= 1.4.0, < 3.0)
294
+ rubocop-ast (1.19.1)
295
+ parser (>= 3.1.1.0)
296
+ ruby-progressbar (1.11.0)
297
+ ruby2_keywords (0.0.5)
298
+ sinatra (2.2.2)
299
+ mustermann (~> 2.0)
300
+ rack (~> 2.2)
301
+ rack-protection (= 2.2.2)
302
+ tilt (~> 2.0)
303
+ sprockets (4.1.1)
304
+ concurrent-ruby (~> 1.0)
305
+ rack (> 1, < 3)
306
+ sprockets-rails (3.4.2)
307
+ actionpack (>= 5.2)
308
+ activesupport (>= 5.2)
309
+ sprockets (>= 3.0.0)
310
+ thor (1.2.1)
311
+ tilt (2.0.11)
312
+ tzinfo (2.0.5)
313
+ concurrent-ruby (~> 1.0)
314
+ unf (0.1.4)
315
+ unf_ext
316
+ unf_ext (0.0.8.2)
317
+ unicode-display_width (2.2.0)
318
+ websocket-driver (0.7.5)
319
+ websocket-extensions (>= 0.1.0)
320
+ websocket-extensions (0.1.5)
321
+ zeitwerk (2.6.0)
322
+
323
+ PLATFORMS
324
+ x86_64-darwin-20
325
+ x86_64-darwin-21
326
+ x86_64-linux
327
+
328
+ DEPENDENCIES
329
+ faraday (~> 2.5.2)
330
+ http (~> 5.1.0)
331
+ hypertrace-agent!
332
+ mongo (~> 2)
333
+ mysql2 (~> 0.5.2)
334
+ nio4r (~> 2.0)
335
+ pg (~> 1.4.3)
336
+ puma (~> 5.2.2)
337
+ rack-test (~> 1.1)
338
+ rails (~> 6.1.3)
339
+ rake (~> 13.0)
340
+ rest-client (~> 2.0.0)
341
+ rspec (~> 3.0)
342
+ rubocop (~> 1.21)
343
+ sinatra (~> 2.1)
344
+
345
+ BUNDLED WITH
346
+ 2.3.4
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Rubyagent
2
+
3
+ ## Installation
4
+
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'hypertrace-agent'
9
+ ```
10
+
11
+ And then execute:
12
+
13
+ $ bundle install
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install hypertrace-agent
18
+
19
+ ## Development
20
+
21
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
22
+
23
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
24
+
25
+ ## Contributing
26
+
27
+ Bug reports and pull requests are welcome on GitHub at https://github.com/hypertrace/rubyagent.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "hypertrace"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/build_proto.sh ADDED
@@ -0,0 +1,3 @@
1
+ protoc --ruby_out=lib/hypertrace/config \
2
+ --proto_path=agent-config/proto/hypertrace/agent/config/v1 \
3
+ ./agent-config/proto/hypertrace/agent/config/v1/config.proto
@@ -0,0 +1,7 @@
1
+ require 'sinatra'
2
+ require_relative '../../lib/hypertrace'
3
+ Hypertrace::RubyAgent.instance.instrument!
4
+
5
+ get '/' do
6
+ "Hello World"
7
+ end