feat(api): Sentry init 加入統一 layer/component 標籤
對齊 Prometheus 告警標籤規範 (layer/component/team) 讓 Sentry 事件與 auto_repair 路由決策保持一致 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user