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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bbec18631527503b850369b0b9ead85ba6c0be8e894527989c17cadb194a463
|
4
|
+
data.tar.gz: 38795078ca0e89512c27b5b63d75a8aee6d0d728eb7aa32f71ff9b5db08881f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31cbd3b56f73852315e0cf7eab8e867ca77219f1a6a77c93c8958f89c9819d1ee600b9692bd6c6da96f09ddab564d6ea584c1d7fd41875fd85bb7dd0da8e2924
|
7
|
+
data.tar.gz: 74527d3708e0224e13fb489558de897d1296f863894f68dd5b392bcf71525ce926887745c19ad813d091e697bb412af770662c0570ebc1a23ec0ce8db3767f17
|
data/CHANGELOG.md
CHANGED
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
|
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
|
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
|
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
|
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.
|
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-
|
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.
|
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.
|
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:
|
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:
|
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:
|
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:
|
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.
|
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.
|
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:
|