Skip to content

Commit e625a80

Browse files
committed
revision and fix ci
1 parent e6cb868 commit e625a80

File tree

8 files changed

+189
-203
lines changed

8 files changed

+189
-203
lines changed

.github/workflows/ci-contrib.yml

Lines changed: 26 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -242,78 +242,38 @@ jobs:
242242
ruby: "jruby-9.4.12.0"
243243

244244
auto-instrumentation:
245-
name: "auto-instrumentation / ubuntu-latest"
246-
runs-on: ubuntu-latest
245+
strategy:
246+
fail-fast: false
247+
matrix:
248+
gem:
249+
- opentelemetry-auto-instrumentation
250+
os:
251+
- ubuntu-latest
252+
name: "${{ matrix.gem }} / ${{ matrix.os }}"
253+
runs-on: ${{ matrix.os }}
247254
steps:
248255
- uses: actions/checkout@v4
249256
- name: "Test Ruby 3.4"
250-
uses: ruby/[email protected]
257+
uses: ./.github/actions/test_gem
251258
with:
252-
ruby-version: "3.4"
253-
- name: Test Gem
254-
shell: bash
255-
run: |
256-
bundle install --quiet --jobs=3 --retry=4
257-
bundle exec rake test
258-
rm -f Gemfile.lock
259-
working-directory: './opentelemetry-auto-instrumentation'
259+
gem: "${{ matrix.gem }}"
260+
ruby: "3.4"
260261
- name: "Test Ruby 3.3"
261-
uses: ruby/[email protected]
262+
uses: ./.github/actions/test_gem
262263
with:
263-
ruby-version: "3.3"
264-
- name: Test Gem
265-
shell: bash
266-
run: |
267-
bundle install --quiet --jobs=3 --retry=4
268-
bundle exec rake test
269-
rm -f Gemfile.lock
270-
working-directory: './opentelemetry-auto-instrumentation'
264+
gem: "${{ matrix.gem }}"
265+
ruby: "3.3"
271266
- name: "Test Ruby 3.2"
272-
uses: ruby/[email protected]
267+
uses: ./.github/actions/test_gem
273268
with:
274-
ruby-version: "3.2"
275-
- name: Test Gem
276-
shell: bash
277-
run: |
278-
bundle install --quiet --jobs=3 --retry=4
279-
bundle exec rake test
280-
rm -f Gemfile.lock
281-
working-directory: './opentelemetry-auto-instrumentation'
282-
- name: "Test Ruby 3.1"
283-
uses: ruby/[email protected]
269+
gem: "${{ matrix.gem }}"
270+
ruby: "3.2"
271+
yard: true
272+
rubocop: true
273+
build: true
274+
- name: "Test JRuby"
275+
if: "${{ matrix.os == 'ubuntu-latest' }}"
276+
uses: ./.github/actions/test_gem
284277
with:
285-
ruby-version: "3.1"
286-
- name: Test Gem
287-
shell: bash
288-
run: |
289-
bundle install --quiet --jobs=3 --retry=4
290-
bundle exec rake test
291-
rm -f Gemfile.lock
292-
working-directory: './opentelemetry-auto-instrumentation'
293-
294-
- name: YARD
295-
shell: bash
296-
run: |
297-
# 📄 Yard Docs 📄
298-
bundle exec rake yard
299-
working-directory: './opentelemetry-auto-instrumentation'
300-
301-
- name: Rubocop
302-
shell: bash
303-
run: |
304-
# 🤖 Rubocop 🤖
305-
bundle exec rake rubocop
306-
working-directory: './opentelemetry-auto-instrumentation'
307-
308-
- name: Coverage
309-
shell: bash
310-
run: |
311-
bundle exec ruby -e 'require "simplecov"; SimpleCov.minimum_coverage(85)'
312-
working-directory: './opentelemetry-auto-instrumentation'
313-
314-
- name: Build Gem
315-
shell: bash
316-
run: |
317-
# 📦 Build Gem 📦
318-
gem build opentelemetry-auto-instrumentation.gemspec
319-
working-directory: './opentelemetry-auto-instrumentation'
278+
gem: "${{ matrix.gem }}"
279+
ruby: "jruby-9.4.12.0"

opentelemetry-auto-instrumentation/Gemfile

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@
66

77
source 'https://rubygems.org'
88

9-
# avoid use gemspec to avoid circular load
9+
gemspec
1010

11-
gem 'opentelemetry-sdk'
12-
gem 'opentelemetry-instrumentation-all'
13-
gem 'opentelemetry-exporter-otlp'
14-
gem 'opentelemetry-test-helpers'
15-
gem 'opentelemetry-resource-detector-container', path: '../resources/container'
16-
17-
gem 'bundler'
18-
gem 'minitest'
19-
gem 'rake'
20-
gem 'rubocop'
21-
gem 'rubocop-performance'
22-
gem 'simplecov'
23-
gem 'yard'
11+
group :test do
12+
gem 'bundler'
13+
gem 'minitest'
14+
gem 'rake'
15+
gem 'rubocop'
16+
gem 'rubocop-performance'
17+
gem 'simplecov'
18+
gem 'yard'
19+
gem 'opentelemetry-test-helpers'
20+
if RUBY_VERSION >= '3.4'
21+
gem 'base64'
22+
gem 'bigdecimal'
23+
gem 'mutex_m'
24+
end
25+
end

opentelemetry-auto-instrumentation/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ In example folder, executing the following commands should result in trace outpu
117117

118118
gem install opentelemetry-auto-instrumentation
119119
bundle install
120-
export REQUIRE_BUNDLER=true
121-
export OTEL_TRACES_EXPORTER=console
122-
RUBYOPT="-r opentelemetry-auto-instrumentation" ruby app.rb
120+
OTEL_RUBY_REQUIRE_BUNDLER=true OTEL_TRACES_EXPORTER=console RUBYOPT="-r opentelemetry-auto-instrumentation" OTEL_RUBY_AUTO_INSTRUMENTATION_DEBUG=false OTEL_RUBY_OPERATOR=false ruby app.rb
123121
```
124122

125123
## Configuration
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
source 'https://rubygems.org'
22

3-
gem 'net-http'

0 commit comments

Comments
 (0)