feat: Add Sentry (#55)

* add basic sentry integration

* add FE sourcemaps to Sentry

* add sentry release step to pre-release workflow

* add test exceptions

* update pnpm lock file

* workflow fixes

* upload rust debug files to sentry in CI

* fix action name

* fix sentry upload action args

* fix env name to match CI

* fix sentry-cli on windows

* remove test errors, format FE files

* cargo fmt

* mcp bin async fix

* update Sentry DSN to new project

* update Sentry DSN to new project
This commit is contained in:
Anastasiia Solop
2025-07-04 11:11:45 +02:00
committed by GitHub
parent ddf61a5fb1
commit 597cefbf97
15 changed files with 1101 additions and 159 deletions

View File

@@ -91,6 +91,19 @@ jobs:
- name: Build frontend
run: npm run frontend:build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Create Sentry release
uses: getsentry/action-release@v3
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
release: ${{ needs.bump-version.outputs.new_version }}
environment: production
sourcemaps: "./frontend/dist"
- name: Upload frontend artifact
uses: actions/upload-artifact@v4
@@ -170,6 +183,17 @@ jobs:
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: ${{ matrix.target == 'aarch64-unknown-linux-gnu' && 'aarch64-linux-gnu-gcc' || '' }}
- name: Setup Sentry CLI
uses: matbour/setup-sentry-cli@v2
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
organization: ${{ secrets.SENTRY_ORG }}
project: ${{ secrets.SENTRY_PROJECT }}
version: 2.21.2
- name: Upload source maps to Sentry
run: sentry-cli debug-files upload --include-sources target/${{ matrix.target }}/release
- name: Prepare binaries (non-macOS)
if: runner.os != 'macOS'
shell: bash