Skip to content

Commit

Permalink
tweak: error & performance tracking (#563)
Browse files Browse the repository at this point in the history
* tweak: error & performance track

* chore: update build env
  • Loading branch information
shhdgit authored Dec 10, 2024
1 parent 43ca592 commit 55274b9
Show file tree
Hide file tree
Showing 6 changed files with 523 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
GATSBY_DOC_BUILD_DATE: ${{ steps.submodule.outputs.build_date }}
GATSBY_DOC_BUILD_GIT_SHA: ${{ steps.submodule.outputs.git_sha }}
GATSBY_DOC_BUILD_SUBMODULE_SHA: ${{ steps.submodule.outputs.submodule_status }}
GATSBY_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: |
yarn build --verbose
Expand Down
3 changes: 3 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ module.exports = {
},
jsxRuntime: "automatic",
plugins: [
{
resolve: "@sentry/gatsby",
},
{
resolve: "gatsby-plugin-google-tagmanager",
options: {
Expand Down
1 change: 1 addition & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require("ts-node").register({ transpileOnly: true });
require("dotenv").config();

const path = require("path");

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@mui/lab": "^5.0.0-alpha.95",
"@mui/material": "^5.10.0",
"@seagreenio/react-bulma": "^0.1.0-beta.4",
"@sentry/gatsby": "^8.42.0",
"algoliasearch": "^4.11.0",
"axios": "^0.24.0",
"clsx": "^1.1.1",
Expand Down
9 changes: 9 additions & 0 deletions sentry.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Sentry from "@sentry/gatsby";

Sentry.init({
environment: process.env.NODE_ENV,
dsn: process.env.GATSBY_SENTRY_DSN,
integrations: [Sentry.browserTracingIntegration()],

tracesSampleRate: 0.1,
});
Loading

0 comments on commit 55274b9

Please sign in to comment.