You can contribute to this project in the following ways:
- Try out the master branch and provide feedback
- File a bug report or propose a feature
- Open a PR for bug fixes or implement requested features
- Give feedback to opened issues/pull requests
- Contribute documentation in the sentry-doc repo
And if you have any questions, please feel free to reach out on Discord.
If you use editors that support VS Code-style multi-root workspaces,
such as VS Code, Cursor...etc., opening the editor with sentry-ruby.code-workspace file will provide a better development experience.
If you use Dev Containers extension, you can open the project with the devcontainer by running Remote-Containers: Reopen in Container command.
The devcontainer is configured with .devcontainer/.env file, that you need to create:
cp .devcontainer/.env.example .devcontainer/.envThis file defines which specific image and Ruby version will be used to run the code. Edit it whenever you need to use a different image or Ruby version.
- Install the dependencies of a specific gem by running
bundlein it's subdirectory. I.e:cd sentry-sidekiq bundle install - Install any additional dependencies.
sentry-sidekiqassumes you haveredisrunning. - Use the
./bin/testhelper to run tests.- In
sentry-rails, you can useRAILS_VERSION=versionto specify the Rails version to test against. Default is8.0 - In
sentry-sidekiq, you can useSIDEKIQ_VERSION=versionto specify what version of Sidekiq to install when you runbundle install. Default is7.0
- In
- Use example apps under the
exampleorexamplesfolder to test the change. (Remember to change the DSN first) - To learn more about
sentry-ruby's structure, you can read the Sentry SDK spec
CI installs against a committed, checksummed lockfile per test-matrix cell (<gem>/gemfiles/<cell>.gemfile.lock) to keep dependencies fully pinned against supply chain attacks. Each gem's test-matrix.json is the source of truth; bin/relock materializes the gemfiles and locks from it.
We use mise for managing the ruby versions, so first install that by following official instructions. The required Rubies are declared in .mise.ci.toml, so provision them once:
mise --env ci install # installs every Ruby the matrix needsThen regenerate locks:
bin/relock # every cell
bin/relock --gem sentry-ruby # one gem
bin/relock --cell sentry-ruby/gemfiles/ruby-3.2_rack-3_redis-5.gemfile # one cellIn CI, the Update lockfiles workflow runs relock on a weekly schedule and opens a PR with the refreshed pins.
Old rubies are not available pre-compiled by mise so you might need some additional flags depending on your system:
On latest macos, Ruby 3.0 needs a patch to compile:
MISE_RUBY_APPLY_PATCHES="https://github.com/ruby/ruby/commit/1dfe75b0beb7171b8154ff0856d5149be0207724.patch" \
mise install ruby@3.0On new linuxes with a very new gcc, you might need:
CFLAGS="-std=gnu11" mise install ruby@2.7Please read the extension guideline to learn more. Feel free to open an issue if you find anything missing.
- Run the example app(s) of the gem and make sure all the events are reported successfully.
- Update the changelog's latest
Unreleasedtitle with the target version.
- Make sure all the new features are documented properly in the changelog. This includes but not limited to:
- Explanation of the feature.
- Sample code for the feature.
- Expected changes on the SDK's behavior and/or on the reported events.
- Some related screenshots.
- Prepare a PR in the sentry-doc repo to update relevant content depending on the changes in the new release.
In addition to all the steps listed above, you also need to:
- Write a migration guide to
- Outline the major changes done in this release.
- Explain why upgrading is beneficial.
- List all the breaking changes and help users make related changes in their apps.
- Update gem READMEs.
- May need to check related wizard files in the sentry-doc repo.