Skip to content

Commit

Permalink
Merge branch 'main' into que
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle authored Feb 4, 2025
2 parents c08fdd1 + 8ca4fc6 commit 9d97512
Show file tree
Hide file tree
Showing 257 changed files with 3,241 additions and 475 deletions.
30 changes: 28 additions & 2 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ inputs:
required: false
type: boolean
default: false
coverage:
description: Enforce test coverage
required: false
type: boolean
default: false
minimum_coverage:
description: Minimum test coverage
required: false
type: string
default: 85
build:
description: Build gem
required: false
Expand Down Expand Up @@ -62,11 +72,19 @@ runs:
fi
fi
# Install ImageMagick for active_storage testing.
# Unfortunately, as of ubuntu-24.04, ImageMagick is no longer pre-installed in Github Actions.
# See https://github.com/actions/runner-images/issues/10772
- name: Install ImageMagick for active_storage testing
if: "${{ inputs.gem == 'opentelemetry-instrumentation-active_storage' }}"
shell: bash
run: sudo apt update && sudo apt install -y imagemagick

# Install ruby and bundle dependencies and cache!
# ...but not for appraisals, sadly.
- name: Install Ruby ${{ inputs.ruby }} with dependencies
if: "${{ steps.setup.outputs.appraisals == 'false' }}"
uses: ruby/setup-ruby@v1.213.0
uses: ruby/setup-ruby@v1.215.0
with:
ruby-version: "${{ inputs.ruby }}"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
Expand All @@ -77,7 +95,7 @@ runs:
# If we're using appraisals, do it all manually.
- name: Install Ruby ${{ inputs.ruby }} without dependencies
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
uses: ruby/setup-ruby@v1.213.0
uses: ruby/setup-ruby@v1.215.0
with:
ruby-version: "${{ inputs.ruby }}"
bundler: "latest"
Expand Down Expand Up @@ -153,6 +171,14 @@ runs:
bundle exec rake rubocop
working-directory: "${{ steps.setup.outputs.gem_dir }}"

- name: Coverage
shell: bash
if: "${{ inputs.coverage == 'true' }}"
# This starts a new simplecov run which tracks nothing of its own,
# but merges with the existing coverage reports generated during testing.
run: 'bundle exec ruby -e ''require "simplecov"; SimpleCov.minimum_coverage(${{ inputs.minimum_coverage }})'''
working-directory: "${{ steps.setup.outputs.gem_dir }}"

- name: Build Gem
shell: bash
if: "${{ inputs.build == 'true' }}"
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ updates:
directory: "/"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/helpers/sql"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/helpers/mysql"
schedule:
Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/ci-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
fail-fast: false
matrix:
gem:
- sql
- mysql
- sql-obfuscation
os:
Expand All @@ -29,6 +30,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -46,13 +52,14 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
- name: "Test JRuby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "jruby-9.4.9.0"
ruby: "jruby-9.4.10.0"

propagators:
strategy:
Expand All @@ -68,6 +75,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -91,7 +103,7 @@ jobs:
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "jruby-9.4.9.0"
ruby: "jruby-9.4.10.0"

resource-detectors:
strategy:
Expand All @@ -107,6 +119,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -124,13 +141,14 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
- name: "Test JRuby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "jruby-9.4.9.0"
ruby: "jruby-9.4.10.0"

processors:
strategy:
Expand All @@ -144,6 +162,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-processor-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -161,10 +184,11 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
- name: "Test JRuby"
if: "${{ matrix.os == 'ubuntu-latest' && steps.jruby_skip.outputs.skip == 'false' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-processor-${{ matrix.gem }}"
ruby: "jruby-9.4.9.0"
ruby: "jruby-9.4.10.0"
38 changes: 37 additions & 1 deletion .github/workflows/ci-instrumentation-with-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -46,12 +51,13 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
- name: "Test JRuby"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "jruby-9.4.9.0"
ruby: "jruby-9.4.10.0"
services:
memcached:
image: memcached:alpine
Expand All @@ -75,6 +81,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -92,6 +103,7 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
services:
mysql:
Expand All @@ -112,6 +124,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -129,6 +146,7 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
services:
zookeeper:
Expand Down Expand Up @@ -165,6 +183,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -182,6 +205,7 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
services:
redis:
Expand Down Expand Up @@ -209,6 +233,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -226,6 +255,7 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
services:
postgres:
Expand All @@ -250,6 +280,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -267,6 +302,7 @@ jobs:
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
services:
rabbitmq:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/ci-instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- active_job
- active_model_serializers
- active_record
- active_storage
- active_support
- all
- aws_sdk
Expand Down Expand Up @@ -59,6 +60,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
Expand All @@ -72,10 +78,11 @@ jobs:
- name: "Test Ruby 3.1"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.1"
yard: true
rubocop: true
coverage: true
build: true
- name: "JRuby Filter"
id: jruby_skip
Expand All @@ -86,6 +93,7 @@ jobs:
[[ "${{ matrix.gem }}" == "action_view" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "active_model_serializers" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "active_record" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "active_storage" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "active_support" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "aws_sdk" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "aws_lambda" ]] && echo "skip=true" >> $GITHUB_OUTPUT
Expand All @@ -106,4 +114,4 @@ jobs:
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "jruby-9.4.9.0"
ruby: "jruby-9.4.10.0"
2 changes: 1 addition & 1 deletion .github/workflows/installation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
# ATTENTION: Dependabot does not know how to update shared actions file.
# If you see it update setup-ruby here also update it as part of actions/test_gem/action.yml
- uses: ruby/setup-ruby@v1.213.0
- uses: ruby/setup-ruby@v1.215.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: "Install Latest Gem Versions on ${{ matrix.ruby-version }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-hook-on-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.213.0
uses: ruby/setup-ruby@v1.215.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-hook-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.213.0
uses: ruby/setup-ruby@v1.215.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-perform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.213.0
uses: ruby/setup-ruby@v1.215.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
Loading

0 comments on commit 9d97512

Please sign in to comment.