opentelemetry-instrumentation-rack 0.24.6 → 0.25.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 +4 -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 +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a865f794a7c18421be44c072dfdc65578b51dc3ad170e0faefd2587518095e15
|
4
|
+
data.tar.gz: 16f97bd4b562f2a9acaba5194ab6286ab3739f254e7ffdbd20118c1106df5709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73da5cbf40d89c2f717969dc37afd9c34e1268655cf64652310c78e364ad49619c755d9696f789ec1afb74454fb32f9ba043e9b804b1d79de61bafb72d4766ed
|
7
|
+
data.tar.gz: 061e53e1e43ed1f0df6499976b8b75cf7927f2edc200b9773ae1efa59973cb2844470af4a312ca00d15f0badb5d712a538473aed83bef3e19b1b9064d52b65dc
|
data/CHANGELOG.md
CHANGED
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.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-
|
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.
|
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.
|
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:
|
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:
|
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:
|
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,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.
|
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.
|
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:
|