Configure releases

Make the git commit SHA available to your running Elysia service.

Required: pass a full Git commit SHA as release. If you omit it, the SDK does not send events.

Platform variables

If you deploy on one of these platforms, pass that platform's variable as release instead of setting RASPUTIN_RELEASE. Rasputin does not read these variables for you.

PlatformRuntime variable
VercelVERCEL_GIT_COMMIT_SHA
RailwayRAILWAY_GIT_COMMIT_SHA
RenderRENDER_GIT_COMMIT
NetlifyCOMMIT_REF
Cloudflare PagesCF_PAGES_COMMIT_SHA
HerokuHEROKU_SLUG_COMMIT
Generic variablesGIT_COMMIT, COMMIT_SHA, or GIT_SHA
RasputinInit({
  dsn: process.env.RASPUTIN_DSN!,
  projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
  environment: 'production',
  release: process.env.VERCEL_GIT_COMMIT_SHA!,
});

Manual configuration

If your platform is not listed above, set RASPUTIN_RELEASE to the full commit SHA during deployment and pass it as release. It must be available at runtime, not only while the application is built.

RASPUTIN_RELEASE=fa1eade47b73733d6312d5abfad33ce9e4068081

Tip: Set this up so every new deployment updates RASPUTIN_RELEASE automatically. A fixed SHA will associate future errors with the wrong release.

Example with Fly.io

Fly deployments need to pass the SHA into the running machine. Choose the example that matches your deployment.

Deploying from your machine

fly deploy --env RASPUTIN_RELEASE="$(git rev-parse HEAD)"

Deploying with GitHub Actions

- name: Deploy
  run: flyctl deploy --env RASPUTIN_RELEASE="$GITHUB_SHA"

Do not pass the SHA only as a Fly or Docker build argument. Build arguments are not automatically available to the running container.