opentelemetry-instrumentation-faraday 0.24.4 → 0.24.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39ec6be55b4bf318fc30fddbe67a94928548fcf913bc089d556ed45c54a0a3c6
|
4
|
+
data.tar.gz: 119610d0f96a58afcb5d4a3611a23eac4754174816773199cc63084fc219d891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 831e19d7d378bb5444764ccb32ad14ad23f0e0d201cb90a64155dc9feffa78a459abe89037c1285c218101c1e70c08f574e2f9b3d7966032b07a2c11691dd819
|
7
|
+
data.tar.gz: 36f868a9c5d23ee86bb300413208d1808c48fd7984a68b09ddced3200d0daf353405b4572ffa7772bf065240455bcf5e60a55e3b203b3a3d56cb102acb89687b
|
data/CHANGELOG.md
CHANGED
@@ -27,6 +27,7 @@ module OpenTelemetry
|
|
27
27
|
|
28
28
|
def require_dependencies
|
29
29
|
require_relative 'middlewares/tracer_middleware'
|
30
|
+
require_relative 'patches/connection'
|
30
31
|
require_relative 'patches/rack_builder'
|
31
32
|
end
|
32
33
|
|
@@ -37,7 +38,11 @@ module OpenTelemetry
|
|
37
38
|
end
|
38
39
|
|
39
40
|
def use_middleware_by_default
|
40
|
-
::Faraday::
|
41
|
+
if Gem::Version.new(::Faraday::VERSION) >= Gem::Version.new('1')
|
42
|
+
::Faraday::Connection.prepend(Patches::Connection)
|
43
|
+
else
|
44
|
+
::Faraday::RackBuilder.prepend(Patches::RackBuilder)
|
45
|
+
end
|
41
46
|
end
|
42
47
|
end
|
43
48
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module OpenTelemetry
|
8
|
+
module Instrumentation
|
9
|
+
module Faraday
|
10
|
+
module Patches
|
11
|
+
# Module to be prepended to force Faraday to use the middleware by
|
12
|
+
# default so the user doesn't have to call `use` for every connection.
|
13
|
+
module Connection
|
14
|
+
# Wraps Faraday::Connection#initialize:
|
15
|
+
# https://github.com/lostisland/faraday/blob/ff9dc1d1219a1bbdba95a9a4cf5d135b97247ee2/lib/faraday/connection.rb#L62-L92
|
16
|
+
def initialize(*args)
|
17
|
+
super.tap do
|
18
|
+
use(:open_telemetry) unless builder.handlers.any? do |handler|
|
19
|
+
handler.klass == Middlewares::TracerMiddleware
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-faraday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -194,16 +194,17 @@ files:
|
|
194
194
|
- lib/opentelemetry/instrumentation/faraday.rb
|
195
195
|
- lib/opentelemetry/instrumentation/faraday/instrumentation.rb
|
196
196
|
- lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb
|
197
|
+
- lib/opentelemetry/instrumentation/faraday/patches/connection.rb
|
197
198
|
- lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
|
198
199
|
- lib/opentelemetry/instrumentation/faraday/version.rb
|
199
200
|
homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
200
201
|
licenses:
|
201
202
|
- Apache-2.0
|
202
203
|
metadata:
|
203
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.
|
204
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.5/file/CHANGELOG.md
|
204
205
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/faraday
|
205
206
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
206
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.
|
207
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.5
|
207
208
|
post_install_message:
|
208
209
|
rdoc_options: []
|
209
210
|
require_paths:
|