opentelemetry-instrumentation-rack 0.31.2 → 0.32.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: 8fee0acda7de18eada9a2c6f2dbed4a518f22bca85179d197d003991173dd70d
4
- data.tar.gz: fbd322a82ad0ab67bf142835dcec558c688142caff4785e4c1ee7c2c18ae97a3
3
+ metadata.gz: a797be7b734f8623eeb3855bb6de2643dbc225d146c67fa090e908a877b11e8d
4
+ data.tar.gz: 448a358aa336e27a3c5aa15b8eacf7f74c3dce2f307b717b8ccb72909720f3c1
5
5
  SHA512:
6
- metadata.gz: 3fbf53b401c0592f1579bb0c02a047a4caae707e7509aa7654cf6274aaf04dec6ea9ad4c8e841c8bd3650ebd1c497c3d42db603da9b758a5d650e7938477a2e7
7
- data.tar.gz: b70bb4e5dbbab7387ac043ea1cbdcd1aef82a3a57b1db9938da2dd73102c0cbdd5c63d523305bed24bf46b28d745c0b451e057cdc5134cbdffc20982048f69f9
6
+ metadata.gz: 6d6c07cd7615ee3d27e988cffe0adc1ce2d3fbeb93ae23ac3638fba7839747ee4d197bd4d991f51fc3c49f616b315f549208e538721b65f2b9ccc08275bd9a4f
7
+ data.tar.gz: e6ae2d36b2849ae7315ae3dc17535a89722ae9d140a0f12d0bae7db0de74b9ce7fca894530469d250f2cd9dfa39476bcc60a616279029c2ac3f7ad08957840d3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-rack
2
2
 
3
+ ## v0.32.0 / 2026-11-17
4
+
5
+ - ADDED: Set client.address from Rack::Request#ip (#2667)
6
+
3
7
  ## v0.31.2 / 2026-09-29
4
8
 
5
9
  - FIXED: Fiber-safe context detachment in `EventHandler` (#2130)
data/README.md CHANGED
@@ -85,9 +85,9 @@ Example usage can be seen in the [`./example/trace_demonstration.rb` file](https
85
85
 
86
86
  ## How can I get involved?
87
87
 
88
- The `opentelemetry-instrumentation-rack` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
88
+ The `opentelemetry-instrumentation-rack` gem source is [on github][repo-github], along with related gems.
89
89
 
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].
90
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby Special Interest Group (SIG). You can find details on our weekly meeting times, GitHub Discussions, and CNCF Slack channels on the [Ruby SDK SIG page][ruby-sig].
91
91
 
92
92
  ## License
93
93
 
@@ -95,12 +95,9 @@ The `opentelemetry-instrumentation-rack` gem is distributed under the Apache 2.0
95
95
 
96
96
  [rack-home]: https://github.com/rack/rack
97
97
  [bundler-home]: https://bundler.io
98
- [repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
98
+ [repo-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib
99
99
  [license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
100
- [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
101
- [community-meetings]: https://github.com/open-telemetry/community#community-meetings
102
- [slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
103
- [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
100
+ [ruby-sig]: https://github.com/open-telemetry/community/blob/main/sigs.md#ruby-sdk
104
101
 
105
102
  ## HTTP semantic convention stability
106
103
 
@@ -204,6 +204,8 @@ module OpenTelemetry
204
204
  }
205
205
 
206
206
  attributes['url.query'] = env['QUERY_STRING'] unless env['QUERY_STRING'].empty?
207
+ client_address = ::Rack::Request.new(env).ip
208
+ attributes['client.address'] = client_address if client_address
207
209
  if env['HTTP_USER_AGENT']
208
210
  attributes['http.user_agent'] = env['HTTP_USER_AGENT']
209
211
  attributes['user_agent.original'] = env['HTTP_USER_AGENT']
@@ -136,6 +136,8 @@ module OpenTelemetry
136
136
  }
137
137
 
138
138
  attributes['url.query'] = env['QUERY_STRING'] unless env['QUERY_STRING'].empty?
139
+ client_address = ::Rack::Request.new(env).ip
140
+ attributes['client.address'] = client_address if client_address
139
141
  if env['HTTP_USER_AGENT']
140
142
  attributes['http.user_agent'] = env['HTTP_USER_AGENT']
141
143
  attributes['user_agent.original'] = env['HTTP_USER_AGENT']
@@ -195,6 +195,8 @@ module OpenTelemetry
195
195
  }
196
196
 
197
197
  attributes['url.query'] = env['QUERY_STRING'] unless env['QUERY_STRING'].empty?
198
+ client_address = ::Rack::Request.new(env).ip
199
+ attributes['client.address'] = client_address if client_address
198
200
  attributes['user_agent.original'] = env['HTTP_USER_AGENT'] if env['HTTP_USER_AGENT']
199
201
  attributes.merge!(extract_request_headers(env))
200
202
  attributes
@@ -132,6 +132,8 @@ module OpenTelemetry
132
132
  }
133
133
 
134
134
  attributes['url.query'] = env['QUERY_STRING'] unless env['QUERY_STRING'].empty?
135
+ client_address = ::Rack::Request.new(env).ip
136
+ attributes['client.address'] = client_address if client_address
135
137
  attributes['user_agent.original'] = env['HTTP_USER_AGENT'] if env['HTTP_USER_AGENT']
136
138
  attributes.merge!(allowed_request_headers(env))
137
139
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Rack
10
- VERSION = '0.31.2'
10
+ VERSION = '0.32.0'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.2
4
+ version: 0.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
@@ -51,10 +51,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
51
51
  licenses:
52
52
  - Apache-2.0
53
53
  metadata:
54
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.31.2/file/CHANGELOG.md
55
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-rack/v0.31.2/instrumentation/rack
54
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.32.0/file/CHANGELOG.md
55
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-rack/v0.32.0/instrumentation/rack
56
56
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
57
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.31.2
57
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-rack/0.32.0
58
58
  rdoc_options: []
59
59
  require_paths:
60
60
  - lib
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 4.0.16
72
+ rubygems_version: 4.0.20
73
73
  specification_version: 4
74
74
  summary: Rack instrumentation for the OpenTelemetry framework
75
75
  test_files: []