opentelemetry-instrumentation-rack 0.24.6 → 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +4 -3
- data/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb +1 -2
- data/lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb +1 -1
- data/lib/opentelemetry/instrumentation/rack/version.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac289c86c4ea8754cb2d6fd9cd54939a18749879c548a7a0b268d03f0c1655fb
|
4
|
+
data.tar.gz: c7f576b24aa2d5ba3481e42c1b85761475d27b141d8302c9739fbca326b128cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d760431593691b8821997ac0f6fdec37d225485a847d37b945e2651254155a5046110c5f856ca30b172bbf2a6894cdf5e9eb4d0f3cd356eb347b759d6f8dac
|
7
|
+
data.tar.gz: 1f69336f2340ecc191b490552f204f35a124643092c68ff596fb49674440c2662c1a3919ee34fb3c51cab1cafbc9e9487586d5d7d203e0f3116ca4634e638d84
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-rack
|
2
2
|
|
3
|
+
### v0.26.0 / 2025-01-16
|
4
|
+
|
5
|
+
* BREAKING CHANGE: Set minimum supported version to Ruby 3.1
|
6
|
+
|
7
|
+
* ADDED: Set minimum supported version to Ruby 3.1
|
8
|
+
|
9
|
+
### v0.25.0 / 2024-10-23
|
10
|
+
|
11
|
+
* ADDED: Set span error only for 5xx response range
|
12
|
+
|
3
13
|
### v0.24.6 / 2024-07-23
|
4
14
|
|
5
15
|
* DOCS: Add cspell to CI
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ The Rack instrumentation is a community-maintained instrumentation for the [Rack
|
|
6
6
|
|
7
7
|
Install the gem using:
|
8
8
|
|
9
|
-
```
|
9
|
+
```console
|
10
10
|
gem install opentelemetry-instrumentation-rack
|
11
11
|
```
|
12
12
|
|
@@ -67,7 +67,7 @@ By default we will set the rack span name to match the format "HTTP #{method}" (
|
|
67
67
|
|
68
68
|
We surface a hook to easily retrieve the rack span within the context of a request so that you can add information to or rename your server span.
|
69
69
|
|
70
|
-
This is how the rails controller instrumentation is able to rename the span names to match the controller and action that process the request. See https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/
|
70
|
+
This is how the rails controller instrumentation is able to rename the span names to match the controller and action that process the request. See <https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/opentelemetry-instrumentation-action_pack/v0.9.0/instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/handlers/action_controller.rb#L29> for an example.
|
71
71
|
|
72
72
|
### High cardinality example
|
73
73
|
|
@@ -87,7 +87,7 @@ Example usage can be seen in the `./example/trace_demonstration.rb` file [here](
|
|
87
87
|
|
88
88
|
The `opentelemetry-instrumentation-rack` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
|
89
89
|
|
90
|
-
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry
|
90
|
+
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].
|
91
91
|
|
92
92
|
## License
|
93
93
|
|
@@ -99,4 +99,5 @@ The `opentelemetry-instrumentation-rack` gem is distributed under the Apache 2.0
|
|
99
99
|
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
|
100
100
|
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
|
101
101
|
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
|
102
|
+
[slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
|
102
103
|
[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
|
@@ -43,7 +43,6 @@ module OpenTelemetry
|
|
43
43
|
include ::Rack::Events::Abstract
|
44
44
|
|
45
45
|
OTEL_TOKEN_AND_SPAN = 'otel.rack.token_and_span'
|
46
|
-
GOOD_HTTP_STATUSES = (100..499)
|
47
46
|
|
48
47
|
# Creates a server span for this current request using the incoming parent context
|
49
48
|
# and registers them as the {current_span}
|
@@ -208,7 +207,7 @@ module OpenTelemetry
|
|
208
207
|
end
|
209
208
|
|
210
209
|
def add_response_attributes(span, response)
|
211
|
-
span.status = OpenTelemetry::Trace::Status.error
|
210
|
+
span.status = OpenTelemetry::Trace::Status.error if response.server_error?
|
212
211
|
attributes = extract_response_attributes(response)
|
213
212
|
span.add_attributes(attributes)
|
214
213
|
rescue StandardError => e
|
@@ -152,7 +152,7 @@ module OpenTelemetry
|
|
152
152
|
end
|
153
153
|
|
154
154
|
def set_attributes_after_request(span, status, headers, _response)
|
155
|
-
span.status = OpenTelemetry::Trace::Status.error
|
155
|
+
span.status = OpenTelemetry::Trace::Status.error if (500..599).cover?(status.to_i)
|
156
156
|
span.set_attribute('http.status_code', status)
|
157
157
|
|
158
158
|
# NOTE: if data is available, it would be good to do this:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.23.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.23.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: appraisal
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,28 +156,28 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.69.1
|
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: 1.
|
166
|
+
version: 1.69.1
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubocop-performance
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 1.23.0
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 1.23.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: simplecov
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
201
|
+
version: 3.24.0
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: 3.24.0
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: yard
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -244,11 +244,11 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
244
244
|
licenses:
|
245
245
|
- Apache-2.0
|
246
246
|
metadata:
|
247
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.
|
247
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.26.0/file/CHANGELOG.md
|
248
248
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/rack
|
249
249
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
250
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.
|
251
|
-
post_install_message:
|
250
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.26.0
|
251
|
+
post_install_message:
|
252
252
|
rdoc_options: []
|
253
253
|
require_paths:
|
254
254
|
- lib
|
@@ -256,15 +256,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
256
256
|
requirements:
|
257
257
|
- - ">="
|
258
258
|
- !ruby/object:Gem::Version
|
259
|
-
version: '3.
|
259
|
+
version: '3.1'
|
260
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
262
|
- - ">="
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
265
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
267
|
-
signing_key:
|
266
|
+
rubygems_version: 3.3.27
|
267
|
+
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: Rack instrumentation for the OpenTelemetry framework
|
270
270
|
test_files: []
|