Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support truffleruby #1295

Merged
merged 5 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ runs:
echo "::set-output name=cache_key::mri"
if [[ "${{ inputs.ruby }}" == "jruby" ]]; then
echo "::set-output name=cache_key::jruby"
elif [[ "${{ inputs.ruby }}" == "truffleruby" ]]; then
echo "::set-output name=cache_key::truffleruby"
fi

echo "::set-output name=appraisals::false"
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ jobs:
with:
gem: "${{ matrix.gem }}"
ruby: "jruby"
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "truffleruby"

exporters:
strategy:
Expand Down Expand Up @@ -119,6 +125,23 @@ jobs:
with:
gem: "${{ matrix.gem }}"
ruby: "jruby"
- name: "Truffleruby Filter"
id: truffleruby_skip
shell: bash
run: |
echo "::set-output name=skip::false"
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp" ]] && echo "::set-output name=skip::true"
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-common" ]] && echo "::set-output name=skip::true"
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "::set-output name=skip::true"
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "::set-output name=skip::true"
# This is essentially a bash script getting evaluated, so we need to return true or the whole job fails.
true
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' && steps.truffleruby_skip.outputs.skip == 'false' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "truffleruby"

propagators:
strategy:
Expand Down Expand Up @@ -161,3 +184,9 @@ jobs:
with:
gem: "${{ matrix.gem }}"
ruby: "jruby"
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "truffleruby"
4 changes: 3 additions & 1 deletion website_docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ Manual instrumentation can be added using the [OpenTelemetry API][manual].
These instructions will explain how to set up automatic and manual instrumentation for a Ruby service.
In order to follow along, you will need:

- MRI Ruby >= `2.7`, or jruby >= `9.3.2.0`
- MRI Ruby >= `2.7`, jruby >= `9.3.2.0`, or truffleruby >= 22.1
- Docker Compose

> jruby only targets compatibility with MRI Ruby 2.6.8; which is EOL. This project does not officially support MRI Ruby 2.6.8, and provides jruby support on a best-effort basis until the jruby project supports compatibility with more modern Ruby runtimes.

> truffleruby is tested, but support is best-effort at this time.

### Installation

The first step is to add these gems to your Gemfile:
Expand Down