Skip to content

Commit eb417a5

Browse files
Merge branch 'main' into excon_semconv_stability_migration
2 parents 0088dce + 3981a52 commit eb417a5

File tree

180 files changed

+2433
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+2433
-330
lines changed

.github/actions/test_gem/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ runs:
8484
# ...but not for appraisals, sadly.
8585
- name: Install Ruby ${{ inputs.ruby }} with dependencies
8686
if: "${{ steps.setup.outputs.appraisals == 'false' }}"
87-
uses: ruby/setup-ruby@v1.237.0
87+
uses: ruby/setup-ruby@v1.245.0
8888
with:
8989
ruby-version: "${{ inputs.ruby }}"
9090
working-directory: "${{ steps.setup.outputs.gem_dir }}"
@@ -95,7 +95,7 @@ runs:
9595
# If we're using appraisals, do it all manually.
9696
- name: Install Ruby ${{ inputs.ruby }} without dependencies
9797
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
98-
uses: ruby/setup-ruby@v1.237.0
98+
uses: ruby/setup-ruby@v1.245.0
9999
with:
100100
ruby-version: "${{ inputs.ruby }}"
101101
bundler: "latest"

.github/workflows/check-spelling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- uses: streetsidesoftware/cspell-action@v6
12+
- uses: streetsidesoftware/cspell-action@v7
1313
with:
1414
# Files should be consistent with check:spelling files
1515
files: |

.github/workflows/ci-instrumentation-with-services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
ZOOKEEPER_CLIENT_PORT: 2181
158158
ZOOKEEPER_TICK_TIME: 2000
159159
kafka:
160-
image: confluentinc/cp-kafka:latest
160+
image: confluentinc/cp-kafka:7.9.1
161161
ports:
162162
- 9092:9092
163163
- 29092:29092

.github/workflows/ci-markdownlint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
# equivalent cli: markdownlint-cli2 "**/*.md" "#**/CHANGELOG.md" --config .markdownlint.json
1313
- name: "Markdown Lint Check"
14-
uses: DavidAnson/markdownlint-cli2-action@v19
14+
uses: DavidAnson/markdownlint-cli2-action@v20
15+
continue-on-error: true
1516
with:
1617
fix: false
1718
globs: |
1819
**/*.md
1920
!**/CHANGELOG.md
20-
continue-on-error: true

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

18-
- uses: fossas/fossa-action@c0a7d013f84c8ee5e910593186598625513cc1e4 # v1.6.0
18+
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
1919
with:
2020
api-key: ${{secrets.FOSSA_API_KEY}}
2121
team: OpenTelemetry

.github/workflows/installation-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626
# ATTENTION: Dependabot does not know how to update shared actions file.
2727
# If you see it update setup-ruby here also update it as part of actions/test_gem/action.yml
28-
- uses: ruby/setup-ruby@v1.237.0
28+
- uses: ruby/setup-ruby@v1.245.0
2929
with:
3030
ruby-version: ${{ matrix.ruby-version }}
3131
- name: "Install Latest Gem Versions on ${{ matrix.ruby-version }}"

.github/workflows/ossf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
persist-credentials: false
2626

27-
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
27+
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
2828
with:
2929
results_file: results.sarif
3030
results_format: sarif
@@ -43,6 +43,6 @@ jobs:
4343
# Upload the results to GitHub's code scanning dashboard (optional).
4444
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4545
- name: "Upload to code-scanning"
46-
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
46+
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
4747
with:
4848
sarif_file: results.sarif

.github/workflows/release-hook-on-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Install Ruby ${{ env.ruby_version }}
15-
uses: ruby/setup-ruby@v1.237.0
15+
uses: ruby/setup-ruby@v1.245.0
1616
with:
1717
ruby-version: ${{ env.ruby_version }}
1818
- name: Checkout repo

.github/workflows/release-hook-on-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Install Ruby ${{ env.ruby_version }}
16-
uses: ruby/setup-ruby@v1.237.0
16+
uses: ruby/setup-ruby@v1.245.0
1717
with:
1818
ruby-version: ${{ env.ruby_version }}
1919
- name: Checkout repo

.github/workflows/release-perform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Install Ruby ${{ env.ruby_version }}
25-
uses: ruby/setup-ruby@v1.237.0
25+
uses: ruby/setup-ruby@v1.245.0
2626
with:
2727
ruby-version: ${{ env.ruby_version }}
2828
- name: Checkout repo

.github/workflows/release-please.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
chmod 0600 $HOME/.gem/credentials
5151
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
5252
53-
- uses: ruby/setup-ruby@v1.237.0
53+
- uses: ruby/setup-ruby@v1.245.0
5454
with:
5555
ruby-version: "3.1"
5656
bundler: latest

.github/workflows/release-request-weekly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Install Ruby ${{ env.ruby_version }}
15-
uses: ruby/setup-ruby@v1.237.0
15+
uses: ruby/setup-ruby@v1.245.0
1616
with:
1717
ruby-version: ${{ env.ruby_version }}
1818
- name: Checkout repo

.github/workflows/release-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Install Ruby ${{ env.ruby_version }}
19-
uses: ruby/setup-ruby@v1.237.0
19+
uses: ruby/setup-ruby@v1.245.0
2020
with:
2121
ruby-version: ${{ env.ruby_version }}
2222
- name: Checkout repo

.github/workflows/release-retry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Install Ruby ${{ env.ruby_version }}
22-
uses: ruby/setup-ruby@v1.237.0
22+
uses: ruby/setup-ruby@v1.245.0
2323
with:
2424
ruby-version: ${{ env.ruby_version }}
2525
- name: Checkout repo

.instrumentation_generator/templates/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ group :test do
2020
gem 'opentelemetry-sdk', '~> 1.0'
2121
gem 'opentelemetry-test-helpers', '~> 0.3'
2222
gem 'rake', '~> 13.0'
23-
gem 'rubocop', '~> 1.75.1'
23+
gem 'rubocop', '~> 1.76.2'
2424
gem 'rubocop-performance', '~> 1.24.0'
2525
gem 'simplecov', '~> 0.17.1'
2626
gem 'webmock', '~> 3.24'

.instrumentation_generator/templates/Readme.md.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ end
3232

3333
## Examples
3434

35-
Example usage can be seen in the `./example/trace_demonstration.rb` file [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/<%= instrumentation_name %>/example/trace_demonstration.rb)
35+
Example usage can be seen in the [`./example/trace_demonstration.rb` file](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/<%= instrumentation_name %>/example/trace_demonstration.rb)
3636

3737
## How can I get involved?
3838

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
source 'https://rubygems.org'
88

99
gem 'rake', '~> 13.0'
10-
gem 'rubocop', '~> 1.75.1'
10+
gem 'rubocop', '~> 1.76.2'
1111
gem 'rubocop-performance', '~> 1.24.0'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Consult instrumentation gem's README file and gemspec for details about library
9292

9393
### Releases
9494

95-
This repository was extracted from the [OpenTelemetry Ruby repository][otel-ruby]. Versions of libraries contained in this repo released prior to 2022-06-13 are available on the [OpenTelemetry Ruby Releases][otel-ruby-releases] page. Newer versions are available [here][otel-ruby-contrib-releases]
95+
This repository was extracted from the [OpenTelemetry Ruby repository][otel-ruby]. Versions of libraries contained in this repo released prior to 2022-06-13 are available on the [OpenTelemetry Ruby Releases][otel-ruby-releases] page. Newer versions are available [on the opentelemetry-ruby-contrib Releases page][otel-ruby-contrib-releases].
9696

9797
## Useful links
9898

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ services:
226226
ZOOKEEPER_TICK_TIME: 2000
227227

228228
kafka:
229-
image: confluentinc/cp-kafka:latest
229+
image: confluentinc/cp-kafka:7.9.1
230230
ports:
231231
- "9092:9092"
232232
- "29092:29092"

helpers/mysql/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ group :test do
1313
gem 'minitest', '~> 5.0'
1414
gem 'opentelemetry-test-helpers', '~> 0.3'
1515
gem 'rake', '~> 13.0'
16-
gem 'rubocop', '~> 1.75.1'
16+
gem 'rubocop', '~> 1.76.2'
1717
gem 'rubocop-performance', '~> 1.24.0'
1818
gem 'simplecov', '~> 0.22.0'
1919
gem 'yard', '~> 0.9'

helpers/sql-obfuscation/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ group :test do
1313
gem 'minitest', '~> 5.0'
1414
gem 'opentelemetry-test-helpers', '~> 0.3'
1515
gem 'rake', '~> 13.0'
16-
gem 'rubocop', '~> 1.75.1'
16+
gem 'rubocop', '~> 1.76.2'
1717
gem 'rubocop-performance', '~> 1.24.0'
1818
gem 'simplecov', '~> 0.22.0'
1919
gem 'yard', '~> 0.9'

helpers/sql/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ group :test do
1818
gem 'minitest', '~> 5.0'
1919
gem 'opentelemetry-test-helpers', '~> 0.3'
2020
gem 'rake', '~> 13.0'
21-
gem 'rubocop', '~> 1.75.1'
21+
gem 'rubocop', '~> 1.76.2'
2222
gem 'rubocop-performance', '~> 1.24.0'
2323
gem 'simplecov', '~> 0.22.0'
2424
gem 'yard', '~> 0.9'

instrumentation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Instrumentation libraries provide pre-built OpenTelemetry instrumentation for po
88

99
Released instrumentations can be found at the [OpenTelemetry registry](https://opentelemetry.io/registry/?language=ruby&component=instrumentation#). You can also look in this project's Github repository: Individual instrumentation libraries can be found in subdirectories under `/instrumentation`.
1010

11-
In-progress instrumentations can be found [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues?q=is%3Aopen+label%3Ainstrumentation+-label%3A%22help+wanted%22+).
11+
[In-progress instrumentations can be found here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues?q=is%3Aopen+label%3Ainstrumentation+-label%3A%22help+wanted%22+).
1212

1313
## How do I get started?
1414

@@ -49,7 +49,7 @@ Please review the individual instrumentation READMEs for more information about
4949

5050
The source for all OpenTelemetry Ruby instrumentation gems is [on github](https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation).
5151

52-
If you are interested in helping out with an instrumentation, you can see instrumentations that have been requested but are not currently in-progress [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues?q=is%3Aopen+label%3Ainstrumentation+label%3A%22help+wanted%22).
52+
If you are interested in helping out with an instrumentation, check out [instrumentations that have been requested but are not currently in-progress](https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues?q=is%3Aopen+label%3Ainstrumentation+label%3A%22help+wanted%22).
5353

5454
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].
5555

instrumentation/action_mailer/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ group :test do
1515
gem 'opentelemetry-sdk', '~> 1.1'
1616
gem 'opentelemetry-test-helpers', '~> 0.3'
1717
gem 'rake', '~> 13.0'
18-
gem 'rubocop', '~> 1.75.1'
18+
gem 'rubocop', '~> 1.76.2'
1919
gem 'rubocop-performance', '~> 1.24.0'
2020
gem 'simplecov', '~> 0.22.0'
2121
gem 'webmock', '~> 3.24'

instrumentation/action_mailer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Internal spans are named using the name of the `ActiveSupport` event that was pr
9191

9292
## Examples
9393

94-
Example usage can be seen in the `./example/trace_request_demonstration.ru` file [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/action_mailer/example/trace_request_demonstration.ru)
94+
Example usage can be seen in the [`./example/trace_request_demonstration.ru` file](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/action_mailer/example/trace_request_demonstration.ru)
9595

9696
## How can I get involved?
9797

instrumentation/action_pack/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Release History: opentelemetry-instrumentation-action_pack
22

3+
### v0.12.3 / 2025-06-16
4+
5+
* FIXED: Action_pack always assuming sdk spans
6+
7+
### v0.12.2 / 2025-06-04
8+
9+
* FIXED: Rack span class naming
10+
11+
### v0.12.1 / 2025-05-07
12+
13+
* FIXED: Account for `nil` routes
14+
315
### v0.12.0 / 2025-02-04
416

517
* ADDED: Strip Rails `(.:format)` suffix from `http.route`

instrumentation/action_pack/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ group :test do
1515
gem 'opentelemetry-sdk', '~> 1.1'
1616
gem 'opentelemetry-test-helpers', '~> 0.3'
1717
gem 'rake', '~> 13.0'
18-
gem 'rubocop', '~> 1.75.1'
18+
gem 'rubocop', '~> 1.76.2'
1919
gem 'rubocop-performance', '~> 1.24.0'
2020
gem 'simplecov', '~> 0.22.0'
2121
gem 'webmock', '~> 3.24'

instrumentation/action_pack/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The error object will be retained within `payload[:exception_object]`. Additiona
6969

7070
## Examples
7171

72-
Example usage can be seen in the `./example/trace_demonstration.rb` file [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/action_pack/example/trace_demonstration.ru)
72+
Example usage can be seen in the [`./example/trace_demonstration.rb` file](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/action_pack/example/trace_demonstration.ru)
7373

7474
## How can I get involved?
7575

instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/handlers/action_controller.rb

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,34 @@ def initialize(config)
2323
# @param payload [Hash] the payload passed as a method argument
2424
# @return [Hash] the payload passed as a method argument
2525
def start(_name, _id, payload)
26-
span_name, attributes = to_span_name_and_attributes(payload)
27-
2826
span = OpenTelemetry::Instrumentation::Rack.current_span
29-
span.name = span_name
27+
return unless span.recording?
28+
29+
request = payload[:request]
30+
# It seems that there are cases in Rails functional tests where it bypasses the routing system and the `action_dispatch.route_uri_pattern` header not being set.
31+
# Our Test suite executes the routing system so we are unable to recreate this error case.
32+
# https://github.com/rails/rails/blob/747f85f200e7bb2c1a31b4e26e5a5655e2dc0cdc/actionpack/lib/action_dispatch/http/request.rb#L160
33+
http_route = request.route_uri_pattern&.chomp('(.:format)') if request.respond_to?(:route_uri_pattern)
34+
35+
attributes = {
36+
OpenTelemetry::SemanticConventions::Trace::CODE_NAMESPACE => String(payload[:controller]),
37+
OpenTelemetry::SemanticConventions::Trace::CODE_FUNCTION => String(payload[:action])
38+
}
39+
attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_ROUTE] = http_route if http_route
40+
attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_TARGET] = request.filtered_path if request.filtered_path != request.fullpath
41+
42+
if @span_naming == :semconv
43+
span.name = if http_route
44+
"#{request.method} #{http_route}"
45+
else
46+
"#{request.method} /#{payload.dig(:params, :controller)}/#{payload.dig(:params, :action)}"
47+
end
48+
# If there is an exception we want to keep the original span name
49+
# so it is easier to see where the request was routed to.
50+
elsif !request.env['action_dispatch.exception']
51+
span.name = "#{payload[:controller]}##{payload[:action]}"
52+
end
53+
3054
span.add_attributes(attributes)
3155
rescue StandardError => e
3256
OpenTelemetry.handle_error(exception: e)
@@ -44,32 +68,6 @@ def finish(_name, _id, payload)
4468
rescue StandardError => e
4569
OpenTelemetry.handle_error(exception: e)
4670
end
47-
48-
private
49-
50-
# Extracts the span name and attributes from the payload
51-
#
52-
# @param payload [Hash] the payload passed from ActiveSupport::Notifications
53-
# @return [Array<String, Hash>] the span name and attributes
54-
def to_span_name_and_attributes(payload)
55-
request = payload[:request]
56-
http_route = request.route_uri_pattern.chomp('(.:format)') if request.respond_to?(:route_uri_pattern)
57-
58-
attributes = {
59-
OpenTelemetry::SemanticConventions::Trace::CODE_NAMESPACE => String(payload[:controller]),
60-
OpenTelemetry::SemanticConventions::Trace::CODE_FUNCTION => String(payload[:action])
61-
}
62-
attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_ROUTE] = http_route if http_route
63-
attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_TARGET] = request.filtered_path if request.filtered_path != request.fullpath
64-
65-
if @span_naming == :semconv
66-
return ["#{request.method} #{http_route}", attributes] if http_route
67-
68-
return ["#{request.method} /#{payload.dig(:params, :controller)}/#{payload.dig(:params, :action)}", attributes]
69-
end
70-
71-
["#{payload[:controller]}##{payload[:action]}", attributes]
72-
end
7371
end
7472
end
7573
end

instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
module OpenTelemetry
88
module Instrumentation
99
module ActionPack
10-
VERSION = '0.12.0'
10+
VERSION = '0.12.3'
1111
end
1212
end
1313
end

instrumentation/action_pack/test/opentelemetry/instrumentation/action_pack/handlers/action_controller_test.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@
215215

216216
describe 'when the application has exceptions_app configured' do
217217
let(:rails_app) { AppConfig.initialize_app(use_exceptions_app: true) }
218+
let(:config) { { span_naming: :class } }
218219

219220
it 'does not overwrite the span name from the controller that raised' do
220221
get 'internal_server_error'
221222

222-
_(span.name).must_match(/^GET/)
223+
_(span.name).must_equal 'ExampleController#internal_server_error'
223224
_(span.kind).must_equal :server
224225
_(span.status.ok?).must_equal false
225226

@@ -235,6 +236,12 @@
235236
_(span.attributes['code.namespace']).must_equal 'ExceptionsController'
236237
_(span.attributes['code.function']).must_equal 'show'
237238
end
239+
240+
it 'does not raise with api/non recording spans' do
241+
with_sampler(OpenTelemetry::SDK::Trace::Samplers::ALWAYS_OFF) do
242+
get 'internal_server_error'
243+
end
244+
end
238245
end
239246

240247
it 'sets filters `http.target`' do

0 commit comments

Comments
 (0)