opentelemetry-instrumentation-restclient 0.19.4 → 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: 76585e70e4f890562d36e79e72fe55d55a377c68f52987ed50fd198995c67c9a
4
- data.tar.gz: 783e0f1457a17e0d43c93565dd50d58c827f0dd470e810f155767b5692b31fb5
3
+ metadata.gz: dbebfacbf6cb542af97cf4122fa9489b471520dd74017b0f4eac49bcdc48ac2a
4
+ data.tar.gz: 351afbfe196e0cda9628c6e6e58e5524a358d3c088c3b446e998a807f8973d7c
5
5
  SHA512:
6
- metadata.gz: a38d08ab4fa161d41ea2d8e89252e5bcbfec20db3e299f3328f1f86725c0a627202bc21f1dc455e4df8bbb8e53a77a082f3fb8bee64d00776e8b9fd1d451360d
7
- data.tar.gz: 7d8df33fee03f1e40d3ee315ebf329260e5d6fb77946f58a0894f4f42cb426c8d58871569acdacae29b7bbeead2b2262fc3e6c6bfe0c9896d3dc0768a5780982
6
+ metadata.gz: f0afb2ec373fdfb9edb7a60aa2c627e3c185eceba7226676afafdd169e3ec7ef35a9cbb08530e04b013eb74a522cd6097918712d8affb6775513aef11cb42943
7
+ data.tar.gz: c20cd763a5b841580160555259d31a4d68cc5a55506a6016109e348fa4eb8b225320ce39f150f96975a203649d6db6bbf648ae4c6e7b17642f26b699232b08eb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
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
+
9
+ ### v0.20.0 / 2022-06-09
10
+
11
+ * Upgrading Base dependency version
12
+ * FIXED: Broken test file requirements
13
+
3
14
  ### v0.19.4 / 2022-05-02
4
15
 
5
16
  * FIXED: Restclient invalid span attribute type Symbol
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 trace_request # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
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
- config = RestClient::Instrumentation.instance.config
28
- instrumentation_attrs['peer.service'] = config[:peer_service] if config[: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.
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module RestClient
10
- VERSION = '0.19.4'
10
+ VERSION = '0.21.0'
11
11
  end
12
12
  end
13
13
  end
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.19.4
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: 2022-05-02 00:00:00.000000000 Z
11
+ date: 2023-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.20.0
47
+ version: 0.21.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.20.0
54
+ version: 0.21.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: appraisal
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -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: '1.17'
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: '1.17'
82
+ version: '2.4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '1.0'
103
+ version: '1.1'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '1.0'
110
+ version: '1.1'
111
+ - !ruby/object:Gem::Dependency
112
+ name: opentelemetry-test-helpers
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rest-client
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +142,14 @@ dependencies:
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: 0.73.0
145
+ version: 1.41.1
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: 0.73.0
152
+ version: 1.41.1
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: simplecov
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -209,14 +223,14 @@ files:
209
223
  - lib/opentelemetry/instrumentation/restclient/instrumentation.rb
210
224
  - lib/opentelemetry/instrumentation/restclient/patches/request.rb
211
225
  - lib/opentelemetry/instrumentation/restclient/version.rb
212
- homepage: https://github.com/open-telemetry/opentelemetry-ruby
226
+ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
213
227
  licenses:
214
228
  - Apache-2.0
215
229
  metadata:
216
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-restclient/v0.19.4/file.CHANGELOG.html
217
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/restclient
218
- bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
219
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-restclient/v0.19.4
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
220
234
  post_install_message:
221
235
  rdoc_options: []
222
236
  require_paths:
@@ -225,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
239
  requirements:
226
240
  - - ">="
227
241
  - !ruby/object:Gem::Version
228
- version: 2.5.0
242
+ version: 2.6.0
229
243
  required_rubygems_version: !ruby/object:Gem::Requirement
230
244
  requirements:
231
245
  - - ">="