opentelemetry-instrumentation-sinatra 0.24.1 → 0.26.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: a78599c829d2be9627e4fc53e0b862987080ae7af515024391d22d97293dd485
4
- data.tar.gz: 7c2da7aebc1a33187902afd199aefe4cbee83866d866021ceec4deb86c078101
3
+ metadata.gz: c4fbd5934b5b69ba96c4fe1843252b66a1aad4ab2b99b8396be00da3b50e56ad
4
+ data.tar.gz: 31da9de9aeb7b032f67f55e38d807394689d90068c39578ec52b70937f84b347
5
5
  SHA512:
6
- metadata.gz: 99d40a9dd38024c716f61d989710c71aa1d55227d506af465dee03a2e7fa52c41104e5aa5acee851eaf99e76a8af7c7eb78dd28d1921e0c2f20370de4b03ffa7
7
- data.tar.gz: d69cbedefa3bbd4ebcf4726f406113d7e2bd1ad04b5bd8a59bf24314903e101dc7aa207f9c2738970323e6310eb2ecd37ee74da076b86e795f2082c07465486f
6
+ metadata.gz: e83f996ccccf5312a930d798fb1f77f508b2b180354d0215238a6bf614012c3e0b058a72ca37e1d20c42cde7017ce2225ad9d920ee1ce254c5f8d57359f43227
7
+ data.tar.gz: 7eb0e3b554cf82f25df2d88bdfc6f244320b9be0f5858b31af6faaf68221126e0d6722b8c33ba78fde9dcaa27bca64afdb552f42a7132ffee6955a86cead7a15
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Release History: opentelemetry-instrumentation-sinatra
2
2
 
3
+ ### v0.26.0 / 2025-08-19
4
+
5
+ * ADDED: Add `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable compatibility for Rack integration [#1594](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/1594)
6
+
7
+ ### v0.25.0 / 2025-01-16
8
+
9
+ * BREAKING CHANGE: Set minimum supported version to Ruby 3.1
10
+
11
+ * ADDED: Set minimum supported version to Ruby 3.1
12
+
3
13
  ### v0.24.1 / 2024-07-23
4
14
 
5
15
  * DOCS: Add cspell to CI
@@ -31,13 +41,13 @@
31
41
  ### v0.23.0 / 2023-06-05
32
42
 
33
43
  * ADDED: Use Rack Middleware Helper
34
- * FIXED: Base config options
44
+ * FIXED: Base config options
35
45
 
36
46
  ### v0.22.0 / 2023-04-17
37
47
 
38
- * BREAKING CHANGE: Drop support for EoL Ruby 2.7
48
+ * BREAKING CHANGE: Drop support for EoL Ruby 2.7
39
49
 
40
- * ADDED: Drop support for EoL Ruby 2.7
50
+ * ADDED: Drop support for EoL Ruby 2.7
41
51
 
42
52
  ### v0.21.5 / 2023-02-13
43
53
 
@@ -53,8 +63,8 @@
53
63
 
54
64
  ### v0.21.2 / 2023-01-14
55
65
 
56
- * DOCS: Fix gem homepage
57
- * DOCS: More gem documentation fixes
66
+ * DOCS: Fix gem homepage
67
+ * DOCS: More gem documentation fixes
58
68
 
59
69
  ### v0.21.1 / 2022-11-16
60
70
 
@@ -62,21 +72,21 @@
62
72
 
63
73
  ### v0.21.0 / 2022-10-12
64
74
 
65
- * ADDED: Use rack middleware in sinatra middleware
66
- * FIXED: Add exceptions to sinatra spans.
75
+ * ADDED: Use rack middleware in sinatra middleware
76
+ * FIXED: Add exceptions to sinatra spans.
67
77
 
68
78
  ### v0.20.0 / 2022-06-09
69
79
 
70
80
  * Upgrading Base dependency version
71
- * FIXED: Broken test file requirements
81
+ * FIXED: Broken test file requirements
72
82
 
73
83
  ### v0.19.4 / 2022-05-02
74
84
 
75
- * FIXED: Update server instrumentation to not reflect 400 status as error
85
+ * FIXED: Update server instrumentation to not reflect 400 status as error
76
86
 
77
87
  ### v0.19.3 / 2021-12-01
78
88
 
79
- * FIXED: Sinatra to stop using api env getter
89
+ * FIXED: Sinatra to stop using api env getter
80
90
 
81
91
  ### v0.19.2 / 2021-09-29
82
92
 
@@ -84,13 +94,13 @@
84
94
 
85
95
  ### v0.19.1 / 2021-08-12
86
96
 
87
- * DOCS: Update docs to rely more on environment variable configuration
97
+ * DOCS: Update docs to rely more on environment variable configuration
88
98
 
89
99
  ### v0.19.0 / 2021-06-23
90
100
 
91
- * BREAKING CHANGE: Total order constraint on span.status=
101
+ * BREAKING CHANGE: Total order constraint on span.status=
92
102
 
93
- * FIXED: Total order constraint on span.status=
103
+ * FIXED: Total order constraint on span.status=
94
104
 
95
105
  ### v0.18.0 / 2021-05-21
96
106
 
data/README.md CHANGED
@@ -6,11 +6,10 @@ The Sinatra instrumentation is a community-maintained instrumentation for the [S
6
6
 
7
7
  Install the gem using:
8
8
 
9
- ```
9
+ ```console
10
10
  gem install opentelemetry-instrumentation-sinatra
11
11
  ```
12
12
 
13
-
14
13
  Or, if you use [bundler][bundler-home], include `opentelemetry-instrumentation-sinatra` to your `Gemfile`.
15
14
 
16
15
  ### Version Compatibility
@@ -59,7 +58,7 @@ end
59
58
 
60
59
  The `opentelemetry-instrumentation-sinatra` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
61
60
 
62
- 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].
61
+ 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].
63
62
 
64
63
  ## License
65
64
 
@@ -71,4 +70,23 @@ The `opentelemetry-instrumentation-sinatra` gem is distributed under the Apache
71
70
  [license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
72
71
  [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
73
72
  [community-meetings]: https://github.com/open-telemetry/community#community-meetings
73
+ [slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
74
74
  [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
75
+
76
+ ## HTTP semantic convention stability
77
+
78
+ In the OpenTelemetry ecosystem, HTTP semantic conventions have now reached a stable state. However, the initial Rack instrumentation was introduced before this stability was achieved, which resulted in HTTP attributes being based on an older version of the semantic conventions.
79
+
80
+ To facilitate the migration to stable semantic conventions, you can use the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable. This variable allows you to opt-in to the new stable conventions, ensuring compatibility and future-proofing your instrumentation.
81
+
82
+ Sinatra instrumentation installs Rack middleware, but the middleware version it installs depends on which `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable is set.
83
+
84
+ When setting the value for `OTEL_SEMCONV_STABILITY_OPT_IN`, you can specify which conventions you wish to adopt:
85
+
86
+ - `http` - Emits the stable HTTP and networking conventions and ceases emitting the old conventions previously emitted by the instrumentation.
87
+ - `http/dup` - Emits both the old and stable HTTP and networking conventions, enabling a phased rollout of the stable semantic conventions.
88
+ - Default behavior (in the absence of either value) is to continue emitting the old HTTP and networking conventions the instrumentation previously emitted.
89
+
90
+ During the transition from old to stable conventions, Rack instrumentation code comes in three patch versions: `dup`, `old`, and `stable`. These versions are identical except for the attributes they send. Any changes to Rack instrumentation should consider all three patches.
91
+
92
+ For additional information on migration, please refer to our [documentation](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/).
@@ -51,7 +51,19 @@ module OpenTelemetry
51
51
  end
52
52
 
53
53
  def install_middleware(app)
54
- app.use(*OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.middleware_args) if config[:install_rack]
54
+ if config[:install_rack]
55
+ stability_opt_in = ENV.fetch('OTEL_SEMCONV_STABILITY_OPT_IN', '')
56
+ values = stability_opt_in.split(',').map(&:strip)
57
+
58
+ if values.include?('http/dup')
59
+ app.use(*OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.middleware_args_dup)
60
+ elsif values.include?('http')
61
+ app.use(*OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.middleware_args_stable)
62
+ else
63
+ app.use(*OpenTelemetry::Instrumentation::Rack::Instrumentation.instance.middleware_args)
64
+ end
65
+ end
66
+
55
67
  app.use(Middlewares::TracerMiddleware)
56
68
  end
57
69
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Sinatra
10
- VERSION = '0.24.1'
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-sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.1
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-08-20 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: opentelemetry-instrumentation-rack
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,160 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.21'
55
- - !ruby/object:Gem::Dependency
56
- name: appraisal
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '2.5'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.5'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '2.4'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '2.4'
83
- - !ruby/object:Gem::Dependency
84
- name: minitest
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '5.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '5.0'
97
- - !ruby/object:Gem::Dependency
98
- name: opentelemetry-sdk
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.1'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.1'
111
- - !ruby/object:Gem::Dependency
112
- name: opentelemetry-test-helpers
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '0.3'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '0.3'
125
- - !ruby/object:Gem::Dependency
126
- name: rack-test
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '2.1'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '2.1'
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 1.65.0
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 1.65.0
153
- - !ruby/object:Gem::Dependency
154
- name: rubocop-performance
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '1.20'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '1.20'
167
- - !ruby/object:Gem::Dependency
168
- name: simplecov
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
172
- - !ruby/object:Gem::Version
173
- version: 0.17.1
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: 0.17.1
181
- - !ruby/object:Gem::Dependency
182
- name: webmock
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '3.19'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '3.19'
195
- - !ruby/object:Gem::Dependency
196
- name: yard
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '0.9'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: '0.9'
209
55
  description: Sinatra instrumentation for the OpenTelemetry framework
210
56
  email:
211
57
  - cncf-opentelemetry-contributors@lists.cncf.io
@@ -228,11 +74,11 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
228
74
  licenses:
229
75
  - Apache-2.0
230
76
  metadata:
231
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sinatra/0.24.1/file/CHANGELOG.md
77
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sinatra/0.26.0/file/CHANGELOG.md
232
78
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/sinatra
233
79
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
234
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sinatra/0.24.1
235
- post_install_message:
80
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sinatra/0.26.0
81
+ post_install_message:
236
82
  rdoc_options: []
237
83
  require_paths:
238
84
  - lib
@@ -240,15 +86,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
86
  requirements:
241
87
  - - ">="
242
88
  - !ruby/object:Gem::Version
243
- version: '3.0'
89
+ version: '3.1'
244
90
  required_rubygems_version: !ruby/object:Gem::Requirement
245
91
  requirements:
246
92
  - - ">="
247
93
  - !ruby/object:Gem::Version
248
94
  version: '0'
249
95
  requirements: []
250
- rubygems_version: 3.2.33
251
- signing_key:
96
+ rubygems_version: 3.3.27
97
+ signing_key:
252
98
  specification_version: 4
253
99
  summary: Sinatra instrumentation for the OpenTelemetry framework
254
100
  test_files: []