feat : error tracking backend vers GlitchTip (via Tailscale) (#37)
Auto Tag Develop / tag (push) Successful in 9s
Auto Tag Develop / tag (push) Successful in 9s
## Objectif Remonter les erreurs **backend** Symfony vers **GlitchTip** (SDK Sentry), **prod uniquement**, **inerte sans `SENTRY_DSN`**. Transport réseau via **Tailscale** sur le host de prod (infra, hors repo). Frontend hors périmètre. ## Contenu - `sentry/sentry-symfony:^5.10` (+ `symfony.lock` recipe) - `config/bundles.php` → `SentryBundle ['prod' => true]` - `config/packages/sentry.yaml` (nouveau) : DSN runtime, release `%app.version%`, 4xx ignorés, pas de tracing, handler Monolog ERROR+ - `config/packages/monolog.yaml` : handler `sentry` en `when@prod` - `.env` : bloc `SENTRY_DSN` documenté (vide → inerte) - `doc/error-tracking.md` (runbook Tailscale) + section `CLAUDE.md` - Spec + plan sous `docs/superpowers/` ## Vérifications - Prod `cache:clear` OK, service `Sentry\Monolog\Handler` chargé - **267/267 tests verts**, dev/test inchangés (bundle non chargé hors prod) - Aucun changement `frontend/` / `.gitea/` / `deploy/docker/` - Revue multi-agents : **READY TO MERGE** (aucun Critical/Important) ## Activation prod (hors code, cf. `doc/error-tracking.md`) 1. Tailscale sur l'hôte GlitchTip **et** sur le VPS OVH (prod) 2. Créer le projet `sirh-api` dans GlitchTip → récupérer le DSN 3. `SENTRY_DSN=http://<clé>@<IP-tailnet>:<port>/<id>` dans l'env_file serveur + redéploiement 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #37 Co-authored-by: matthieu <matthieu@yuno.malio.fr> Co-committed-by: matthieu <matthieu@yuno.malio.fr>
This commit was merged in pull request #37.
This commit is contained in:
@@ -39,10 +39,17 @@ FROM php:8.4-fpm AS production
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libicu-dev libpq-dev libpng-dev libzip-dev libxml2-dev \
|
||||
nginx supervisor \
|
||||
nginx supervisor ca-certificates \
|
||||
&& docker-php-ext-install -j$(nproc) intl pdo_pgsql zip gd opcache \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# CA racine interne MALIO (auto-signée) — permet au SDK Sentry/HttpClient de joindre
|
||||
# GlitchTip en HTTPS sur logs.malio-dev.fr (cert *.malio-dev.fr). Le host est résolu vers
|
||||
# l'IP tailnet via `extra_hosts` dans le docker-compose du serveur (cf. doc/error-tracking.md).
|
||||
# Sans cette CA approuvée, le SDK logue « Message not sent » et rien ne remonte.
|
||||
COPY deploy/docker/malio-dev-root-ca.crt /usr/local/share/ca-certificates/malio-dev-root-ca.crt
|
||||
RUN update-ca-certificates
|
||||
|
||||
# PHP production config
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
COPY docker/php/config/php.ini "$PHP_INI_DIR/conf.d/99-app.ini"
|
||||
|
||||
Reference in New Issue
Block a user