opentelemetry-instrumentation-rack 0.24.5 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d970b79afa440fd31b1eb6861ead0cc41fba62751a74f0e4b201610b847be85d
4
- data.tar.gz: 6292738f5af40b4edd3d4afe8d828de5fbc9f0f24ae1452e0cd5f1da5f2340cc
3
+ metadata.gz: a865f794a7c18421be44c072dfdc65578b51dc3ad170e0faefd2587518095e15
4
+ data.tar.gz: 16f97bd4b562f2a9acaba5194ab6286ab3739f254e7ffdbd20118c1106df5709
5
5
  SHA512:
6
- metadata.gz: b3a05fe16a3199930d6b3b103ada296db525a614f9f1b667fd4ac550cc7a6812cb1fe02d2239a925051d05cd078b74352d1e62120b477ec44e68231a0d29993a
7
- data.tar.gz: a65e21348190d2ba51d9f946a02669c472e97b93f7c1c35ff6cd9e9aceca64d3575a676afd9aa86b5ea22e335196e1d5de6093c2e24fbfd7002f39579201ec37
6
+ metadata.gz: 73da5cbf40d89c2f717969dc37afd9c34e1268655cf64652310c78e364ad49619c755d9696f789ec1afb74454fb32f9ba043e9b804b1d79de61bafb72d4766ed
7
+ data.tar.gz: 061e53e1e43ed1f0df6499976b8b75cf7927f2edc200b9773ae1efa59973cb2844470af4a312ca00d15f0badb5d712a538473aed83bef3e19b1b9064d52b65dc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History: opentelemetry-instrumentation-rack
2
2
 
3
+ ### v0.25.0 / 2024-10-23
4
+
5
+ * ADDED: Set span error only for 5xx response range
6
+
7
+ ### v0.24.6 / 2024-07-23
8
+
9
+ * DOCS: Add cspell to CI
10
+
3
11
  ### v0.24.5 / 2024-06-18
4
12
 
5
13
  * FIXED: Relax otel common gem constraints
@@ -80,7 +88,7 @@
80
88
 
81
89
  ### v0.20.1 / 2021-12-01
82
90
 
83
- * FIXED: [Instruentation Rack] Log content type http header
91
+ * FIXED: [Instrumentation Rack] Log content type http header
84
92
  * FIXED: Use monotonic clock where possible
85
93
  * FIXED: Rack to stop using api env getter
86
94
 
@@ -115,7 +123,7 @@ forwards the uri path. More details on this is available in the readme.
115
123
 
116
124
  ### v0.18.0 / 2021-05-21
117
125
 
118
- * ADDED: Updated API depedency for 1.0.0.rc1
126
+ * ADDED: Updated API dependency for 1.0.0.rc1
119
127
  * FIXED: Removed http.status_text attribute #750
120
128
 
121
129
  ### v0.17.0 / 2021-04-22
@@ -181,7 +189,7 @@ forwards the uri path. More details on this is available in the readme.
181
189
 
182
190
  * FIXED: Remove superfluous file from Rack gem
183
191
  * DOCS: Added README for Rack Instrumentation
184
- * DOCS: Standardize toplevel docs structure and readme
192
+ * DOCS: Standardize top-level docs structure and readme
185
193
 
186
194
  ### v0.6.0 / 2020-09-10
187
195
 
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.5'
10
+ VERSION = '0.25.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.5
4
+ version: 0.25.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: 2024-06-18 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.64.0
159
+ version: 1.66.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: 1.64.0
166
+ version: 1.66.0
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.22.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.22.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,10 +244,10 @@ 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.5/file/CHANGELOG.md
247
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.25.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.5
250
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.25.0
251
251
  post_install_message:
252
252
  rdoc_options: []
253
253
  require_paths: