Compare commits

..

2 Commits

Author SHA1 Message Date
Mathis HERRIOT
1a03384b49 chore: bump version to 1.10.3
Some checks failed
CI/CD Pipeline / Valider frontend (push) Failing after 1m12s
CI/CD Pipeline / Valider backend (push) Successful in 1m50s
CI/CD Pipeline / Valider documentation (push) Successful in 1m57s
CI/CD Pipeline / Déploiement en Production (push) Has been skipped
2026-02-09 14:02:25 +01:00
Mathis HERRIOT
3f7e592600 feat(sentry): integrate Sentry SDK with Next.js and configure DSN
- Added Sentry client, server, and edge configurations for enhanced error monitoring.
- Updated `.env.example` and `docker-compose` to include `NEXT_PUBLIC_SENTRY_DSN`.
- Modified `next.config.ts` to use `withSentryConfig` for source map uploads.
- Installed `@sentry/nextjs` as a dependency and updated `pnpm-lock.yaml`.
2026-02-09 14:00:28 +01:00
12 changed files with 1056 additions and 28 deletions

View File

@@ -43,6 +43,7 @@ DOMAIN_NAME=localhost
ENABLE_CORS=false
CORS_DOMAIN_NAME=localhost
SENTRY_DSN=
NEXT_PUBLIC_SENTRY_DSN=
# Media Limits (in KB)
MAX_IMAGE_SIZE_KB=512

View File

@@ -106,3 +106,5 @@ jobs:
MAIL_FROM: ${{ secrets.MAIL_FROM }}
DOMAIN_NAME: ${{ secrets.DOMAIN_NAME }}
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}

View File

@@ -1,6 +1,6 @@
{
"name": "@memegoat/backend",
"version": "1.10.2",
"version": "1.10.3",
"description": "",
"author": "",
"private": true,

View File

@@ -134,6 +134,7 @@ services:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-https://api.memegoat.fr}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-https://memegoat.fr}
NEXT_PUBLIC_CONTACT_EMAIL: ${MAIL_FROM:-noreply@memegoat.fr}
NEXT_PUBLIC_SENTRY_DSN: ${NEXT_PUBLIC_SENTRY_DSN}
depends_on:
- backend

View File

@@ -122,6 +122,7 @@ services:
environment:
NODE_ENV: production
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:3000}
NEXT_PUBLIC_SENTRY_DSN: ${NEXT_PUBLIC_SENTRY_DSN}
depends_on:
- backend

View File

@@ -1,3 +1,4 @@
import { withSentryConfig } from "@sentry/nextjs";
import type { NextConfig } from "next";
const appUrl = process.env.NEXT_PUBLIC_APP_URL || "https://memegoat.fr";
@@ -29,4 +30,23 @@ const nextConfig: NextConfig = {
output: "standalone",
};
export default nextConfig;
export default withSentryConfig(nextConfig, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
org: "yidhra",
project: "javascript-nextjs",
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your Sentry bill.
tunnelRoute: "/monitoring",
});

View File

@@ -1,6 +1,6 @@
{
"name": "@memegoat/frontend",
"version": "1.10.2",
"version": "1.10.3",
"private": true,
"scripts": {
"dev": "next dev",
@@ -38,6 +38,7 @@
"@radix-ui/react-toggle": "^1.1.10",
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
"@sentry/nextjs": "^10.38.0",
"axios": "^1.13.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",

View File

@@ -0,0 +1,22 @@
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Ajustez ces valeurs en production
tracesSampleRate: 1.0,
// Replay est activé par défaut
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
integrations: [
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],
// Protection PII
sendDefaultPii: false,
});

View File

@@ -0,0 +1,11 @@
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Ajustez ces valeurs en production
tracesSampleRate: 1.0,
// Protection PII
sendDefaultPii: false,
});

View File

@@ -0,0 +1,22 @@
import { createHash } from "node:crypto";
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Ajustez ces valeurs en production
tracesSampleRate: 1.0,
// Protection PII
sendDefaultPii: false,
beforeSend(event) {
// Hachage de l'IP utilisateur pour Sentry si elle est présente
if (event.user?.ip_address) {
event.user.ip_address = createHash("sha256")
.update(event.user.ip_address)
.digest("hex");
}
return event;
},
});

View File

@@ -1,6 +1,6 @@
{
"name": "@memegoat/source",
"version": "1.10.2",
"version": "1.10.3",
"description": "",
"scripts": {
"version:get": "cmake -P version.cmake GET",

995
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff