opentelemetry-instrumentation-restclient 0.20.0 → 0.21.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbebfacbf6cb542af97cf4122fa9489b471520dd74017b0f4eac49bcdc48ac2a
|
4
|
+
data.tar.gz: 351afbfe196e0cda9628c6e6e58e5524a358d3c088c3b446e998a807f8973d7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0afb2ec373fdfb9edb7a60aa2c627e3c185eceba7226676afafdd169e3ec7ef35a9cbb08530e04b013eb74a522cd6097918712d8affb6775513aef11cb42943
|
7
|
+
data.tar.gz: c20cd763a5b841580160555259d31a4d68cc5a55506a6016109e348fa4eb8b225320ce39f150f96975a203649d6db6bbf648ae4c6e7b17642f26b699232b08eb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-restclient
|
2
2
|
|
3
|
+
### v0.21.0 / 2023-01-14
|
4
|
+
|
5
|
+
* ADDED: Add request/response hooks to more http clients
|
6
|
+
* DOCS: Fix gem homepage
|
7
|
+
* DOCS: More gem documentation fixes
|
8
|
+
|
3
9
|
### v0.20.0 / 2022-06-09
|
4
10
|
|
5
11
|
* Upgrading Base dependency version
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ Apache 2.0 license. See [LICENSE][license-github] for more information.
|
|
43
43
|
[restclient-home]: https://github.com/rest-client/rest-client
|
44
44
|
[bundler-home]: https://bundler.io
|
45
45
|
[repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
|
46
|
-
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
|
46
|
+
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
|
47
47
|
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
|
48
48
|
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
|
49
49
|
[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
|
@@ -18,14 +18,14 @@ module OpenTelemetry
|
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
|
-
def
|
21
|
+
def create_request_span
|
22
22
|
http_method = method.upcase
|
23
23
|
instrumentation_attrs = {
|
24
24
|
'http.method' => http_method.to_s,
|
25
25
|
'http.url' => OpenTelemetry::Common::Utilities.cleanse_url(url)
|
26
26
|
}
|
27
|
-
|
28
|
-
instrumentation_attrs['peer.service'] =
|
27
|
+
instrumentation_config = RestClient::Instrumentation.instance.config
|
28
|
+
instrumentation_attrs['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
|
29
29
|
span = tracer.start_span(
|
30
30
|
"HTTP #{http_method}",
|
31
31
|
attributes: instrumentation_attrs.merge(
|
@@ -38,6 +38,12 @@ module OpenTelemetry
|
|
38
38
|
OpenTelemetry.propagation.inject(processed_headers)
|
39
39
|
end
|
40
40
|
|
41
|
+
span
|
42
|
+
end
|
43
|
+
|
44
|
+
def trace_request
|
45
|
+
span = create_request_span
|
46
|
+
|
41
47
|
yield(span).tap do |response|
|
42
48
|
# Verify return value is a response.
|
43
49
|
# If so, add additional attributes.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-restclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.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:
|
11
|
+
date: 2023-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.4'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.4'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 1.41.1
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 1.41.1
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: simplecov
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,14 +223,14 @@ files:
|
|
223
223
|
- lib/opentelemetry/instrumentation/restclient/instrumentation.rb
|
224
224
|
- lib/opentelemetry/instrumentation/restclient/patches/request.rb
|
225
225
|
- lib/opentelemetry/instrumentation/restclient/version.rb
|
226
|
-
homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
226
|
+
homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
227
227
|
licenses:
|
228
228
|
- Apache-2.0
|
229
229
|
metadata:
|
230
|
-
changelog_uri: https://
|
231
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/restclient
|
232
|
-
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
233
|
-
documentation_uri: https://
|
230
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-restclient/0.21.0/file/CHANGELOG.md
|
231
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/restclient
|
232
|
+
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
233
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-restclient/0.21.0
|
234
234
|
post_install_message:
|
235
235
|
rdoc_options: []
|
236
236
|
require_paths:
|