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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e18717dabce66a13cf0dbbb14f53820e8cd76758a4b27680db3d2b21cbb9318
4
- data.tar.gz: 0671d5f2dbddef0466ceea1f1c81a207063a2a4b201c015b1dc1ee671d9b877a
3
+ metadata.gz: ac289c86c4ea8754cb2d6fd9cd54939a18749879c548a7a0b268d03f0c1655fb
4
+ data.tar.gz: c7f576b24aa2d5ba3481e42c1b85761475d27b141d8302c9739fbca326b128cc
5
5
  SHA512:
6
- metadata.gz: 720c682e663bdb55bf01c5b1ddc37c704dd0b8173f4e6bb89d6c7a6d5d6a64557b9abc869bc516cfda7f441a8d359f4a2a5fa472ec3299340429330f55428055
7
- data.tar.gz: 1fa48af98fc0c4222f6c6449e291244f8362fa5d7ef7a26d722dd41bcaceb05c41f1735c5c7efaebd0b54a5e31b06d020c823bd1e95af49c0a00d1707e2e47b7
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/main/instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/patches/action_controller/metal.rb#L15-L16 for an example.
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-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].
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 unless GOOD_HTTP_STATUSES.include?(response.status.to_i)
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 unless (100..499).cover?(status.to_i)
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:
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Rack
10
- VERSION = '0.24.6'
10
+ VERSION = '0.26.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-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.6
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: 2024-07-24 00:00:00.000000000 Z
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.22.1
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.22.1
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.65.0
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.65.0
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: '1.20'
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: '1.20'
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: '3.19'
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: '3.19'
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.24.6/file/CHANGELOG.md
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.24.6
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.0'
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.2.33
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: []