opentelemetry-instrumentation-restclient 0.22.7 → 0.22.8

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: 4aad6f512003fc8131ccd718d2bc8a1e0b3b74b47a9ae1c6618fee5c3ef008b6
4
- data.tar.gz: 0555a5d3bda05551ee21885302f21ce13087504fa9b3f159f1011ea95362228d
3
+ metadata.gz: 7bbec18631527503b850369b0b9ead85ba6c0be8e894527989c17cadb194a463
4
+ data.tar.gz: 38795078ca0e89512c27b5b63d75a8aee6d0d728eb7aa32f71ff9b5db08881f8
5
5
  SHA512:
6
- metadata.gz: 2008b75bd7baf55f84260fcacbee6275c475f7c372c97d213b7bd04dcf027f2fe40e4cabb68da799364ca7a1a40aa4b0da19633b9bf9c0224af6609400d5297f
7
- data.tar.gz: '08e17b11db98b7121f0469e92977dfc993621dd289efa68f4a495fe5802bfbc22a2e7a7939848646ab5784788beb5cc19005abed77c281e4da09184a6e40aded'
6
+ metadata.gz: 31cbd3b56f73852315e0cf7eab8e867ca77219f1a6a77c93c8958f89c9819d1ee600b9692bd6c6da96f09ddab564d6ea584c1d7fd41875fd85bb7dd0da8e2924
7
+ data.tar.gz: 74527d3708e0224e13fb489558de897d1296f863894f68dd5b392bcf71525ce926887745c19ad813d091e697bb412af770662c0570ebc1a23ec0ce8db3767f17
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-restclient
2
2
 
3
+ ### v0.22.8 / 2024-11-26
4
+
5
+ * CHANGED: Performance Freeze all range objects #1222
6
+
3
7
  ### v0.22.7 / 2024-07-23
4
8
 
5
9
  * DOCS: Add cspell to CI
data/README.md CHANGED
@@ -6,7 +6,7 @@ The OpenTelemetry RestClient gem is a community maintained instrumentation for t
6
6
 
7
7
  Install the gem using:
8
8
 
9
- ```
9
+ ```console
10
10
  gem install opentelemetry-instrumentation-restclient
11
11
  ```
12
12
 
@@ -34,7 +34,7 @@ end
34
34
 
35
35
  The `opentelemetry-instrumentation-restclient` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
36
36
 
37
- The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
37
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special interest group (SIG). You can get involved by joining us on our [GitHub Discussions][discussions-url], [Slack Channel][slack-channel] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
38
38
 
39
39
  ## License
40
40
 
@@ -46,4 +46,5 @@ Apache 2.0 license. See [LICENSE][license-github] for more information.
46
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
+ [slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
49
50
  [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -10,6 +10,9 @@ module OpenTelemetry
10
10
  module Patches
11
11
  # Module to prepend to RestClient::Request for instrumentation
12
12
  module Request
13
+ # Constant for the HTTP status range
14
+ HTTP_STATUS_SUCCESS_RANGE = (100..399)
15
+
13
16
  def execute(&block)
14
17
  trace_request do |_span|
15
18
  super
@@ -49,13 +52,12 @@ module OpenTelemetry
49
52
  # If so, add additional attributes.
50
53
  if response.is_a?(::RestClient::Response)
51
54
  span.set_attribute('http.status_code', response.code)
52
- span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response.code.to_i)
55
+ span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(response.code.to_i)
53
56
  end
54
57
  end
55
58
  rescue ::RestClient::ExceptionWithResponse => e
56
59
  span.set_attribute('http.status_code', e.http_code)
57
- span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(e.http_code.to_i)
58
-
60
+ span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(e.http_code.to_i)
59
61
  raise e
60
62
  ensure
61
63
  span.finish
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module RestClient
10
- VERSION = '0.22.7'
10
+ VERSION = '0.22.8'
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.22.7
4
+ version: 0.22.8
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-07-24 00:00:00.000000000 Z
11
+ date: 2024-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -114,28 +114,28 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.65.0
117
+ version: 1.68.0
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: 1.65.0
124
+ version: 1.68.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop-performance
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.20'
131
+ version: 1.23.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.20'
138
+ version: 1.23.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '3.19'
159
+ version: 3.24.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '3.19'
166
+ version: 3.24.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: yard
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -199,10 +199,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
199
199
  licenses:
200
200
  - Apache-2.0
201
201
  metadata:
202
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-restclient/0.22.7/file/CHANGELOG.md
202
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-restclient/0.22.8/file/CHANGELOG.md
203
203
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/restclient
204
204
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
205
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-restclient/0.22.7
205
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-restclient/0.22.8
206
206
  post_install_message:
207
207
  rdoc_options: []
208
208
  require_paths: