-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
6,291 additions
and
4,965 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,22 @@ | |
"test:api": "cd packages/api && EGAPRO_DBPORT=5436 EGAPRO_DBNAME=test_egapro ./venv/bin/py.test -vv --cov" | ||
}, | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^6.0.2", | ||
"@semantic-release/git": "^10.0.1", | ||
"@socialgouv/releaserc": "^1.1.1", | ||
"concurrently": "^8.2.0", | ||
"semantic-release": "^19" | ||
"@semantic-release/changelog": "*", | ||
"@semantic-release/git": "*", | ||
"@socialgouv/releaserc": "*", | ||
"@testing-library/dom": "^10.4.0", | ||
"concurrently": "*", | ||
"eslint": "^8.0.0", | ||
"next": "^14.0.4", | ||
"semantic-release": "*", | ||
"webpack": "^5.97.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@sentry/profiling-node": "^8.47.0", | ||
"@types/react": "^18.2.0", | ||
"@types/react-dom": "^18.2.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,29 +3,38 @@ | |
// https://docs.sentry.io/platforms/javascript/guides/nextjs/ | ||
|
||
import * as Sentry from "@sentry/nextjs"; | ||
import { browserTracingIntegration, browserProfilingIntegration, replayIntegration } from "@sentry/nextjs"; | ||
import { commonConfig } from "./sentry.config.common"; | ||
|
||
Sentry.init({ | ||
dsn: "https://[email protected]/99", | ||
environment: process.env.EGAPRO_ENV || "dev", | ||
// Adjust this value in production, or use tracesSampler for greater control | ||
tracesSampleRate: 0.1, | ||
...commonConfig, | ||
|
||
// Setting this option to true will print useful information to the console while you're setting up Sentry. | ||
debug: false, | ||
// Session Replay configuration | ||
replaysOnErrorSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0, | ||
replaysSessionSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0, | ||
|
||
replaysOnErrorSampleRate: 1.0, | ||
|
||
// This sets the sample rate to be 10%. You may want this to be 100% while | ||
// in development and sample at a lower rate in production | ||
replaysSessionSampleRate: 0.1, | ||
|
||
// You can remove this option if you're not planning to use the Sentry Session Replay feature: | ||
integrations: [ | ||
// eslint-disable-next-line import/namespace | ||
new Sentry.Replay({ | ||
// Additional Replay configuration goes in here, for example: | ||
replayIntegration({ | ||
// Privacy settings | ||
maskAllText: true, | ||
blockAllMedia: true, | ||
maskAllInputs: true, | ||
|
||
// Network | ||
networkDetailAllowUrls: [ | ||
// Add allowed URLs for network capturing | ||
"https://api.egapro.fabrique.social.gouv.fr", | ||
], | ||
networkRequestHeaders: ["method", "referrer"], | ||
networkResponseHeaders: ["content-type", "content-length"], | ||
}), | ||
browserTracingIntegration(), | ||
browserProfilingIntegration(), | ||
], | ||
tracePropagationTargets: [ | ||
"localhost", | ||
"egapro.fabrique.social.gouv.fr", | ||
], | ||
// Enable profiling | ||
profilesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0, | ||
}); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,14 +3,32 @@ | |
// https://docs.sentry.io/platforms/javascript/guides/nextjs/ | ||
|
||
import * as Sentry from "@sentry/nextjs"; | ||
import { commonConfig } from "./sentry.config.common"; | ||
|
||
Sentry.init({ | ||
dsn: "https://[email protected]/99", | ||
environment: process.env.EGAPRO_ENV || "dev", | ||
...commonConfig, | ||
|
||
// Adjust this value in production, or use tracesSampler for greater control | ||
tracesSampleRate: 0.1, | ||
// Server-specific settings | ||
integrations: [ | ||
Sentry.httpIntegration(), | ||
Sentry.expressIntegration(), | ||
Sentry.onUncaughtExceptionIntegration(), | ||
Sentry.onUnhandledRejectionIntegration() | ||
], | ||
|
||
// Setting this option to true will print useful information to the console while you're setting up Sentry. | ||
debug: false, | ||
// Additional server configuration | ||
autoSessionTracking: true, | ||
serverName: process.env.HOSTNAME, | ||
|
||
// Specific sampling for server-side | ||
tracesSampler: (samplingContext) => { | ||
// Adjust sampling based on the operation | ||
if (samplingContext.transactionContext?.name?.includes("healthcheck")) { | ||
return 0.0; // Don't sample healthchecks | ||
} | ||
if (samplingContext.transactionContext?.name?.includes("/api/")) { | ||
return 0.5; // Sample 50% of API calls | ||
} | ||
return 0.1; // Default sample rate | ||
}, | ||
}); |
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.