Skip to content

Commit

Permalink
fix: add sentry config
Browse files Browse the repository at this point in the history
  • Loading branch information
alxshelepenok committed Dec 3, 2024
1 parent 365c23c commit ee3d140
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
3 changes: 1 addition & 2 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ export default {
{
resolve: "@sentry/gatsby",
options: {
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1,
deleteSourcemapsAfterUpload: true,
},
},
"gatsby-plugin-image",
Expand Down
4 changes: 2 additions & 2 deletions internal/definitions/matchers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { Matchers, AsymmetricMatchers } from "bun:test";
import { TestingLibraryMatchers } from "@testing-library/jest-dom/matchers";

declare module "bun:test" {
interface Matchers<T> extends TestingLibraryMatchers<typeof expect.stringContaining, T> {}
interface AsymmetricMatchers extends TestingLibraryMatchers {}
interface Matchers<T> extends TestingLibraryMatchers<typeof expect.stringContaining, T> { };
interface AsymmetricMatchers extends TestingLibraryMatchers { };
}
2 changes: 1 addition & 1 deletion internal/gatsby/on-create-webpack-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from "path";

import { type CreateWebpackConfigArgs } from "gatsby";
import { type CompilerOptions } from "typescript";
import { type CreateWebpackConfigArgs } from "gatsby";

import { compilerOptions } from "../../tsconfig.json";

Expand Down
12 changes: 12 additions & 0 deletions sentry.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as Sentry from "@sentry/gatsby";

Sentry.init({
dsn: process.env.GATSBY_SENTRY_DSN,
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
],
tracesSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"verbatimModuleSyntax": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"forceConsistentCasingInFileNames": true
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.tsx"]
Expand Down

0 comments on commit ee3d140

Please sign in to comment.