opentelemetry-instrumentation-restclient 0.20.0 → 0.22.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: 8e7c0c53aa12bb16e1dae518980e458315bfe55deafcb03b232e446da32a0606
4
- data.tar.gz: b7fa463d459a11195105079ee181e02f32d5fad55a79b8821a6278cb10c163e4
3
+ metadata.gz: b2ad45d59bdef842fc98a273e590cdd0d1a4e1b4515f11dd21ba2c527de6e214
4
+ data.tar.gz: 426776881f0e77d7d60fdcf2c7ba1598275498791140a09b41fe32efce275c1d
5
5
  SHA512:
6
- metadata.gz: a08fe93efd2b713a7fb6f1ee57ce89d6e58b74ade534792d2f49bbb420b48248d353cedd57550cc6a316ccfb98e040c6e8c2f263c96e24ddb7095d8151135157
7
- data.tar.gz: 9619afe1e62f13e34c919e996271cfa9330810602be44015d5479bc51dbbafb06618351e0aa540b2ba201924a2154507610cc0f9e96f801f7034bfde55f3b676
6
+ metadata.gz: 83533baff53964ccd5e448eaa44b242b0ceb80336dcb3fc50e371f6a400f1441ec1ab22964e89b252dafa1ed93b0fbe8fa8761cc181e0729f45b053606ba5127
7
+ data.tar.gz: 2828d34402edd5c09631466278cb195aa2d89a25b9028d8e45eb67bb6112e34a411034ef8f326ea981017082fb7d272797b420c3ad71e58daee047aa375d3f7a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release History: opentelemetry-instrumentation-restclient
2
2
 
3
+ ### v0.22.0 / 2023-04-17
4
+
5
+ * BREAKING CHANGE: Drop support for EoL Ruby 2.7
6
+
7
+ * ADDED: Drop support for EoL Ruby 2.7
8
+
9
+ ### v0.21.0 / 2023-01-14
10
+
11
+ * ADDED: Add request/response hooks to more http clients
12
+ * DOCS: Fix gem homepage
13
+ * DOCS: More gem documentation fixes
14
+
3
15
  ### v0.20.0 / 2022-06-09
4
16
 
5
17
  * 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 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.20.0'
10
+ VERSION = '0.22.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.20.0
4
+ version: 0.22.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-06-09 00:00:00.000000000 Z
11
+ date: 2023-04-17 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.21.0
47
+ version: 0.22.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.21.0
54
+ version: 0.22.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
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: opentelemetry-test-helpers
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '0.3'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '0.3'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rest-client
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.73.0
145
+ version: 1.48.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: 0.73.0
152
+ version: 1.48.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://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-restclient/v0.20.0/file.CHANGELOG.html
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://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-restclient/v0.20.0
230
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-restclient/0.22.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.22.0
234
234
  post_install_message:
235
235
  rdoc_options: []
236
236
  require_paths:
@@ -239,14 +239,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
239
239
  requirements:
240
240
  - - ">="
241
241
  - !ruby/object:Gem::Version
242
- version: 2.6.0
242
+ version: '3.0'
243
243
  required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  requirements:
245
245
  - - ">="
246
246
  - !ruby/object:Gem::Version
247
247
  version: '0'
248
248
  requirements: []
249
- rubygems_version: 3.1.6
249
+ rubygems_version: 3.2.33
250
250
  signing_key:
251
251
  specification_version: 4
252
252
  summary: REST Client instrumentation for the OpenTelemetry framework