Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-ruby-contrib into logger-instrumentation
  • Loading branch information
khushijain21 committed Mar 29, 2024
2 parents 595ecc5 + 435481e commit f510b3d
Show file tree
Hide file tree
Showing 451 changed files with 9,736 additions and 2,135 deletions.
4 changes: 4 additions & 0 deletions .commit-me.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"include-pull-requests": true,
"types": [ "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "release", "revert", "squash", "style", "test" ]
}
18 changes: 13 additions & 5 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ inputs:
required: false
type: boolean
default: false
latest:
description: Build against the latest version of the gem
required: false
type: boolean
default: false

runs:
using: composite
Expand All @@ -50,26 +55,29 @@ runs:
fi
echo "appraisals=false" >> $GITHUB_OUTPUT
if [[ -f "${dir}/Appraisals" ]]; then
echo "appraisals=true" >> $GITHUB_OUTPUT
if [[ "${{ inputs.latest }}" != "true" ]]; then
if [[ -f "${dir}/Appraisals" ]]; then
echo "appraisals=true" >> $GITHUB_OUTPUT
fi
fi
# 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.144.1
uses: ruby/setup-ruby@v1.165.1
with:
ruby-version: "${{ inputs.ruby }}"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
bundler: "latest"
bundler-cache: true
cache-version: "v1-${{ steps.setup.outputs.cache_key }}"
cache-version: "${{ inputs.ruby }}-${{ steps.setup.outputs.cache_key }}"

# 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.144.1
uses: ruby/setup-ruby@v1.165.1
with:
ruby-version: "${{ inputs.ruby }}"
bundler: "latest"
Expand Down
14 changes: 13 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ updates:
directory: "/"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/helpers/mysql"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/helpers/sql-obfuscation"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/propagator/ottrace"
schedule:
Expand Down Expand Up @@ -174,10 +182,14 @@ updates:
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resource_detectors"
directory: "/resources/azure"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resources/container"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/resources/google_cloud_platform"
schedule:
interval: weekly
76 changes: 73 additions & 3 deletions .github/workflows/ci-contrib-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,53 @@ on:
- cron: "0 0 * * *"

jobs:
helpers:
strategy:
fail-fast: false
matrix:
gem:
- mysql
- sql-obfuscation
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: "helpers-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "3.2"
- name: "Test Ruby 3.1"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "3.1"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "3.0"
yard: true
rubocop: 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.2.0"
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "truffleruby"

propagators:
strategy:
fail-fast: false
Expand All @@ -20,23 +67,32 @@ jobs:
name: "propagator-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "3.3"
latest: "true"
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "3.2"
latest: "true"
- name: "Test Ruby 3.1"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "3.1"
latest: "true"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "3.0"
latest: "true"
yard: true
rubocop: true
build: true
Expand All @@ -46,44 +102,56 @@ jobs:
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "jruby-9.4.2.0"
latest: "true"
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "truffleruby"
latest: "true"

resource-detectors:
strategy:
fail-fast: false
matrix:
gem:
- resource_detectors
- resource-detector-azure
- resource-detector-container
- resource-detector-google_cloud_platform
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: "opentelemetry-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "3.3"
latest: "true"
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "3.2"
latest: "true"
- name: "Test Ruby 3.1"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "3.1"
latest: "true"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "3.0"
latest: "true"
yard: true
rubocop: true
build: true
Expand All @@ -93,9 +161,11 @@ jobs:
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "jruby-9.4.2.0"
latest: "true"
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "truffleruby"
latest: "true"
56 changes: 53 additions & 3 deletions .github/workflows/ci-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,45 @@ on:
- main

jobs:
helpers:
strategy:
fail-fast: false
matrix:
gem:
- mysql
- sql-obfuscation
os:
- ubuntu-latest
name: "helpers-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "3.2"
- name: "Test Ruby 3.1"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "3.1"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-helpers-${{ matrix.gem }}"
ruby: "3.0"
yard: true
rubocop: 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.2.0"

propagators:
strategy:
fail-fast: false
Expand All @@ -22,7 +61,12 @@ jobs:
name: "propagator-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-propagator-${{ matrix.gem }}"
ruby: "3.3"
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down Expand Up @@ -54,14 +98,20 @@ jobs:
fail-fast: false
matrix:
gem:
- resource_detectors
- resource-detector-azure
- resource-detector-container
- resource-detector-google_cloud_platform
os:
- ubuntu-latest
name: "opentelemetry-${{ matrix.gem }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-${{ matrix.gem }}"
ruby: "3.3"
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/ci-instrumentation-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ jobs:
- faraday
- grape
- graphql
- gruf
- http
- http_client
- koala
- lmdb
- logger
- net_http
- httpx
- rack
- rails
- restclient
Expand All @@ -57,23 +59,32 @@ jobs:
name: ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.3"
latest: "true"
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.2"
latest: "true"
- name: "Test Ruby 3.1"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.1"
latest: "true"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.0"
latest: "true"
yard: true
rubocop: true
build: true
Expand Down Expand Up @@ -103,6 +114,7 @@ jobs:
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
latest: "true"
ruby: "jruby-9.4.2.0"
- name: "Truffleruby Filter"
id: truffleruby_skip
Expand All @@ -125,3 +137,4 @@ jobs:
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "truffleruby"
latest: "true"
Loading

0 comments on commit f510b3d

Please sign in to comment.