-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: initialize Sentry * feat(extension): add sentry to CSP on build --------- Co-authored-by: Michael Chappell <7581002+mchappell@users.noreply.github.com>
- Loading branch information
Showing
13 changed files
with
687 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Sentry Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
actions: read | ||
|
||
jobs: | ||
upload-source-maps: | ||
name: Upload Source Maps to Sentry | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js and install dependencies | ||
uses: ./.github/actions/install | ||
with: | ||
WALLET_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Build Lace and trigger Sentry plugin to upload source maps | ||
uses: ./.github/shared/build | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} | ||
BLOCKFROST_PROJECT_ID_MAINNET: ${{ secrets.BLOCKFROST_PROJECT_ID_MAINNET }} | ||
BLOCKFROST_PROJECT_ID_PREPROD: ${{ secrets.BLOCKFROST_PROJECT_ID_PREPROD }} | ||
BLOCKFROST_PROJECT_ID_PREVIEW: ${{ secrets.BLOCKFROST_PROJECT_ID_PREVIEW }} | ||
BLOCKFROST_PROJECT_ID_SANCHONET: ${{ secrets.BLOCKFROST_PROJECT_ID_SANCHONET }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
SENTRY_ORG: ${{ vars.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as Sentry from '@sentry/react'; | ||
|
||
Sentry.init({ | ||
environment: process.env.NODE_ENV, | ||
dsn: process.env.SENTRY_DSN, | ||
integrations: [Sentry.browserTracingIntegration(), Sentry.browserProfilingIntegration(), Sentry.replayIntegration()], | ||
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled | ||
tracePropagationTargets: ['localhost', 'chrome-extension://gafhhkghbfjjkeiendhlofajokpaflmk'], | ||
// .5% | ||
tracesSampleRate: 0.05, | ||
profilesSampleRate: 0.05, | ||
// Since profilesSampleRate is relative to tracesSampleRate, | ||
// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate | ||
// A tracesSampleRate of 0.05 and profilesSampleRate of 0.05 results in 2.5% of | ||
// transactions being profiled (0.05*0.05=0.0025) | ||
|
||
// Capture Replay for 0.05% of all sessions, | ||
replaysSessionSampleRate: 0.005, | ||
// ...plus for 100% of sessions with an error | ||
replaysOnErrorSampleRate: 1.0 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.