hypertrace-agent 0.1.1 → 0.2.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: 32ec7ff05ccceb6c55d2767de910774d1fddec382974e93f663c07f213836a2a
4
- data.tar.gz: e9d77ce5ef4d97fe7daf238e65971b3472d671c3263d883e7bad9f9a7289b70d
3
+ metadata.gz: 72fe004f0d8ec3f2a5f268089a2c2d4a170e521b7e2de9da7129c712d1b8b9bc
4
+ data.tar.gz: a5349884ebdf574e31f88bb21af8be74fd89eec03c063ccebebadafb88dfc6f4
5
5
  SHA512:
6
- metadata.gz: fcdb5dfdb5729a0ac1e4345cada86d39934bdf1622cbd3bf6829d9c086acc038c328669906e98340a50ac6cff3c90c26aa6001f6fc6f2859972a4d31c7370b1b
7
- data.tar.gz: 947a762e0a3291a779e1aa2e73360628cb433a09ffc8ee398578cbdfa7c71a0eb02067a9ca426d7012e804f917e74ea1a34b84be2ca45be0ccb759d52bc1960f
6
+ metadata.gz: ce385e7fd27ea6c409535d36959a8dc192c1e685139638400e9ae49219b66bfe1f73e48c66062bcd7e9775bac8e7258cb5ba1d2944d9eba0036522c9762f4258
7
+ data.tar.gz: 6d62d34ad83f77f4f70d19483e6b77eed963fccd63f85bc3ac1f72a118d697cabef0aef21cd8586f01acf25384938dda02f39a070773b195e375df0ac3e2330d
@@ -3,6 +3,9 @@ module OpenTelemetry::Instrumentation::Net::HTTP::Patches::Instrumentation
3
3
  # Do not trace recursive call for starting the connection
4
4
  return super(req, body, &block) unless started?
5
5
 
6
+ # Prevent tracing our own export calls
7
+ return super(req, body, &block) if req.path == "/v1/traces"
8
+
6
9
  scheme = use_ssl? ? "https://" : "http"
7
10
  url = "#{scheme}#{@address}:#{@port}#{req.path}"
8
11
  attributes = {
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hypertrace
4
- VERSION = "0.1.1"
4
+ VERSION = "0.2.0"
5
5
  end
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.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - prodion23
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-17 00:00:00.000000000 Z
11
+ date: 2024-05-09 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.5
19
+ version: 3.25.2
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.5
26
+ version: 3.25.2
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: []
@@ -274,14 +274,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
274
  requirements:
275
275
  - - ">="
276
276
  - !ruby/object:Gem::Version
277
- version: 2.6.0
277
+ version: 2.7.0
278
278
  required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  requirements:
280
280
  - - ">="
281
281
  - !ruby/object:Gem::Version
282
282
  version: '0'
283
283
  requirements: []
284
- rubygems_version: 3.4.6
284
+ rubygems_version: 3.2.3
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