-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QA] Monitorer la plateforme et tracker les erreurs JS #2230
Conversation
SENTRY_ENVIRONMENT, | ||
SENTRY_TRACES_SAMPLE_RATE, | ||
AXIOS_TIMEOUT | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Les variables d'environnements ne sont pas tous exposé à travers process.env mais l'accès se fait directement à travers son nom (console.log(process.env) ne marchera pas)
- Une fois le build effectué, seule la valeur est présente dans le fichier buildé
- Exposer uniquement les données utile et non sensible (utilise le .env en locale)
Pour en savoir plus
https://www.npmjs.com/package/dotenv-webpack#how-secure
doRequestGet (ajaxUrl: string, functionReturn: Function) { | ||
axios | ||
.get(ajaxUrl, { timeout: 15000 }) | ||
.get(ajaxUrl, { timeout: AXIOS_TIMEOUT }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai pas appliqué la constante à tous les composants car l'enjeu est uniquement sur le formulaire
|
||
export const requests = { | ||
// TODO : voir avec Emilien pour ne plus gérer via des callbacks mais faire de l'async pour rendre le code plus lisible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Réflexion partagé cette été mais pas d'enjeu je supprime (une histoire d'habitude)
@@ -86,6 +88,9 @@ Encore | |||
}, | |||
}; | |||
}) | |||
.addPlugin(new Dotenv({ | |||
path: isDev ? '.env.local' : '.env' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utilisation de .env.local avec make npm-watch
et utilisation de .env avec make npm-build
e183d71
to
4c3041c
Compare
SENTRY_TRACES_SAMPLE_RATE= | ||
SENTRY_DSN_FRONT=https://06f9905de7b646ec902183ce78384f18@sentry.incubateur.net/142 | ||
SENTRY_ENVIRONMENT=prod | ||
SENTRY_TRACES_SAMPLE_RATE=1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finalement besoin de ces valeurs sur la phase de build js et y'a pas d'enjeu à exposer ces valeurs, faudra par contre filtrer les événements provenant de localhost sur le dashboard
Relecture ok, mais blocage par uBlock :) |
Test en local OK, une fois uBlock désactivé |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oki !
051251c
to
ed9e2c9
Compare
|
Ticket
#894
Review app : https://histologe-staging-pr2230.osc-fr1.scalingo.io/
Description
Création d'un nouveau projet sentry afin de monitorer et tracker les erreurs histologe
Changements apportés
Pré-requis
Ajout d'une nouvelle variable environnement
Tests
https://sentry.incubateur.net/organizations/betagouv/issues/?project=142
Documentation
https://www.npmjs.com/package/dotenv-webpack
https://docs.sentry.io/platforms/javascript/