opentelemetry-instrumentation-faraday 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/opentelemetry/instrumentation/faraday.rb +1 -0
- data/lib/opentelemetry/instrumentation/faraday/instrumentation.rb +2 -0
- data/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb +15 -7
- data/lib/opentelemetry/instrumentation/faraday/version.rb +1 -1
- metadata +35 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fda98783faef5cce019d7008af200a08fd630cd788abfc050d8b286e6b828c9a
|
4
|
+
data.tar.gz: 6dab2946fc130712cc8c4a4c8e8eddb32fc5339bf492ec484f03b272bdd6ed97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17b7fe993b923be365f97f1fd97ebd9a83c969b40cbe63a474c703cc8769d68b8298f9942e1a0fe8d801f6795d72dfa1cdc8276b3d13dbecb3efbbe51b8f8535
|
7
|
+
data.tar.gz: 9984084f4134e9161740783a4cdbb253324bc8d30a4dacea3e1f35de484a4f4655ca91a6a827d6711e60b7ec9128939aab03eda892e790e378b1b8b253d25194
|
data/CHANGELOG.md
CHANGED
@@ -25,14 +25,11 @@ module OpenTelemetry
|
|
25
25
|
|
26
26
|
def call(env)
|
27
27
|
http_method = HTTP_METHODS_SYMBOL_TO_STRING[env.method]
|
28
|
-
|
28
|
+
attributes = span_creation_attributes(
|
29
|
+
http_method: http_method, url: env.url
|
30
|
+
)
|
29
31
|
tracer.in_span(
|
30
|
-
"HTTP #{http_method}",
|
31
|
-
attributes: {
|
32
|
-
'http.method' => http_method,
|
33
|
-
'http.url' => env.url.to_s
|
34
|
-
},
|
35
|
-
kind: :client
|
32
|
+
"HTTP #{http_method}", attributes: attributes, kind: :client
|
36
33
|
) do |span|
|
37
34
|
OpenTelemetry.propagation.inject(env.request_headers)
|
38
35
|
|
@@ -44,6 +41,17 @@ module OpenTelemetry
|
|
44
41
|
|
45
42
|
attr_reader :app
|
46
43
|
|
44
|
+
def span_creation_attributes(http_method:, url:)
|
45
|
+
instrumentation_attrs = {
|
46
|
+
'http.method' => http_method, 'http.url' => url.to_s
|
47
|
+
}
|
48
|
+
config = Faraday::Instrumentation.instance.config
|
49
|
+
instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
|
50
|
+
instrumentation_attrs.merge(
|
51
|
+
OpenTelemetry::Common::HTTP::ClientContext.attributes
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
47
55
|
def tracer
|
48
56
|
Faraday::Instrumentation.instance.tracer
|
49
57
|
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.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -16,14 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.17.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.17.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: opentelemetry-common
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.17.0
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
40
|
+
version: 0.17.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: opentelemetry-instrumentation-base
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.17.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.17.0
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: appraisal
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,10 +214,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
186
214
|
licenses:
|
187
215
|
- Apache-2.0
|
188
216
|
metadata:
|
189
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-faraday/v0.
|
217
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-faraday/v0.17.0/file.CHANGELOG.html
|
190
218
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/faraday
|
191
219
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
192
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-faraday/v0.
|
220
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-faraday/v0.17.0
|
193
221
|
post_install_message:
|
194
222
|
rdoc_options: []
|
195
223
|
require_paths:
|
@@ -205,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
233
|
- !ruby/object:Gem::Version
|
206
234
|
version: '0'
|
207
235
|
requirements: []
|
208
|
-
rubygems_version: 3.1.
|
236
|
+
rubygems_version: 3.1.6
|
209
237
|
signing_key:
|
210
238
|
specification_version: 4
|
211
239
|
summary: Faraday instrumentation for the OpenTelemetry framework
|