hypertrace-agent 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hypertrace/instrumentation/rack_env_getter.rb +34 -0
- data/lib/hypertrace/ruby_agent.rb +1 -0
- data/lib/hypertrace/version.rb +1 -1
- metadata +6 -6
- data/rubyagent.gemspec +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f4e3af544ca2b87293959ce1bf8e81eaea8581e0447d4a2fd4767a3f208d4bd
|
4
|
+
data.tar.gz: beb4a87a206b3f8fc4994c0577dfd8dda6db6d479493f063623bf5d5c967bbb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d22245c00b22746c8cb3addae5d48def9a719e9b0a92aa82e5cafdb397348c047b2466856afe6f05e55f06196fb3be0bbdce349087a0a346fc796f9075af708
|
7
|
+
data.tar.gz: 4058fc87586fce6f5f75ba57d16e9b2a68ff25577d33b8dc3af4e9483123d4a6032698594a393afc1ec6017c9da6bf0c3cc928b642ce5d0ff6dbec7852870b93
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Custom patch to temporarily maintain 2.7.x support
|
4
|
+
|
5
|
+
module OpenTelemetry
|
6
|
+
module Common
|
7
|
+
module Propagation
|
8
|
+
# The RackEnvGetter class provides a common methods for reading
|
9
|
+
# keys from a rack environment. It abstracts away the rack-normalization
|
10
|
+
# process so that keys can be looked up without having to transform them
|
11
|
+
# first. With this class you can get +traceparent+ instead of
|
12
|
+
# +HTTP_TRACEPARENT+
|
13
|
+
class RackEnvGetter
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def to_rack_key(key)
|
18
|
+
ret = "HTTP_#{key}"
|
19
|
+
ret = ret.tr('-', '_')
|
20
|
+
ret = ret.upcase
|
21
|
+
ret
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_rack_key(key)
|
25
|
+
start = key.start_with?('HTTP_') ? 5 : 0
|
26
|
+
ret = key[start..]
|
27
|
+
ret = ret.tr('_', '-')
|
28
|
+
ret = ret.downcase!
|
29
|
+
ret
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -91,6 +91,7 @@ class Hypertrace::RubyAgent
|
|
91
91
|
apply_custom_patch './instrumentation/http_patch'
|
92
92
|
apply_custom_patch './instrumentation/faraday_patch'
|
93
93
|
apply_custom_patch './instrumentation/rest_client_patch'
|
94
|
+
apply_custom_patch './instrumentation/rack_env_getter'
|
94
95
|
|
95
96
|
configure_propagators
|
96
97
|
end
|
data/lib/hypertrace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hypertrace-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- prodion23
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.21.
|
19
|
+
version: 3.21.7
|
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: 3.21.
|
26
|
+
version: 3.21.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: opentelemetry-api
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -253,13 +253,13 @@ files:
|
|
253
253
|
- lib/hypertrace/instrumentation/net_http_patch.rb
|
254
254
|
- lib/hypertrace/instrumentation/rack.rb
|
255
255
|
- lib/hypertrace/instrumentation/rack_compatible.rb
|
256
|
+
- lib/hypertrace/instrumentation/rack_env_getter.rb
|
256
257
|
- lib/hypertrace/instrumentation/rest_client_patch.rb
|
257
258
|
- lib/hypertrace/instrumentation/sinatra.rb
|
258
259
|
- lib/hypertrace/logging.rb
|
259
260
|
- lib/hypertrace/ruby_agent.rb
|
260
261
|
- lib/hypertrace/version.rb
|
261
262
|
- release.sh
|
262
|
-
- rubyagent.gemspec
|
263
263
|
- sig/rubyagent.rbs
|
264
264
|
homepage: https://hypertrace.com
|
265
265
|
licenses: []
|
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
|
-
rubygems_version: 3.
|
284
|
+
rubygems_version: 3.1.6
|
285
285
|
signing_key:
|
286
286
|
specification_version: 4
|
287
287
|
summary: Write a short summary, because RubyGems requires one.
|
data/rubyagent.gemspec
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "lib/hypertrace/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "hypertrace-agent"
|
7
|
-
spec.version = Hypertrace::VERSION
|
8
|
-
spec.authors = ["prodion23"]
|
9
|
-
spec.email = ["Write your email address"]
|
10
|
-
|
11
|
-
spec.summary = "Write a short summary, because RubyGems requires one."
|
12
|
-
spec.description = "Hypertrace ..."
|
13
|
-
spec.homepage = "https://hypertrace.com"
|
14
|
-
spec.required_ruby_version = ">= 2.6.0"
|
15
|
-
|
16
|
-
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
17
|
-
|
18
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
-
spec.metadata["source_code_uri"] = "https://github.com/hypertrace/rubyagent"
|
20
|
-
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
21
|
-
|
22
|
-
# Specify which files should be added to the gem when it is released.
|
23
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
-
end
|
28
|
-
end
|
29
|
-
spec.bindir = "exe"
|
30
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
-
spec.require_paths = ["lib"]
|
32
|
-
|
33
|
-
# Uncomment to register a new dependency of your gem
|
34
|
-
# spec.add_dependency "example-gem", "~> 1.0"
|
35
|
-
spec.add_dependency 'google-protobuf', '3.21.5'
|
36
|
-
spec.add_dependency 'opentelemetry-api', '1.0.2'
|
37
|
-
spec.add_dependency 'opentelemetry-sdk', '1.1.0'
|
38
|
-
spec.add_dependency 'opentelemetry-propagator-b3', '0.20.0'
|
39
|
-
spec.add_dependency 'opentelemetry-exporter-otlp', '0.21.1'
|
40
|
-
spec.add_dependency 'opentelemetry-exporter-zipkin', '0.20.0'
|
41
|
-
spec.add_dependency 'opentelemetry-instrumentation-faraday', '0.21.0'
|
42
|
-
spec.add_dependency 'opentelemetry-instrumentation-mysql2', '0.21.0'
|
43
|
-
spec.add_dependency 'opentelemetry-instrumentation-pg', '0.21.0'
|
44
|
-
spec.add_dependency 'opentelemetry-instrumentation-mongo', '0.20.0'
|
45
|
-
spec.add_dependency 'opentelemetry-instrumentation-net_http', '0.20.0'
|
46
|
-
spec.add_dependency 'opentelemetry-instrumentation-http', '0.20.0'
|
47
|
-
spec.add_dependency 'opentelemetry-instrumentation-rails', '0.22.0'
|
48
|
-
spec.add_dependency 'opentelemetry-instrumentation-restclient', '0.20.0'
|
49
|
-
spec.add_dependency 'opentelemetry-instrumentation-sinatra', '0.20.0'
|
50
|
-
|
51
|
-
# For more information and examples about making a new gem, check out our
|
52
|
-
# guide at: https://bundler.io/guides/creating_gem.html
|
53
|
-
end
|