From 7a6fa6359e36f2c32fa89a2493076626c7c79718 Mon Sep 17 00:00:00 2001 From: OG T Date: Sun, 5 Apr 2026 11:10:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(api):=20Sentry=20init=20=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E7=B5=B1=E4=B8=80=20layer/component=20=E6=A8=99=E7=B1=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 對齊 Prometheus 告警標籤規範 (layer/component/team) 讓 Sentry 事件與 auto_repair 路由決策保持一致 Co-Authored-By: Claude Sonnet 4.6 --- apps/api/src/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/api/src/main.py b/apps/api/src/main.py index 8bcc64e4..764323f7 100644 --- a/apps/api/src/main.py +++ b/apps/api/src/main.py @@ -158,6 +158,11 @@ if SENTRY_DSN: # Phase 15.3: Deep Linking hook before_send=_sentry_before_send, ) + # 2026-04-05 Claude Code: 加入統一標籤,對齊 Prometheus/auto_repair layer 規範 + sentry_sdk.set_tag("layer", "k8s") + sentry_sdk.set_tag("component", "api") + sentry_sdk.set_tag("host", "k8s-awoooi-prod") + sentry_sdk.set_tag("team", "backend") logger.info("sentry_initialized", dsn=SENTRY_DSN.split("@")[-1]) else: logger.info("sentry_disabled", reason="SENTRY_DSN not configured")