Error Reporting / Trace / Profiler
Error Reporting
What / why
- Scans Cloud Logging entries → aggregate & de-dupe exceptions (stack trace 기반).
- Real-time grouping, dashboard, instant notifications (email, mobile app, Slack, webhooks).
Hard constraints (중요!)
- 분석 가능한 로그 = global region의 Cloud Logging bucket에 저장된 것만.
- Same source/destination project, CMEK disabled.
- Regionalized buckets, 다른 프로젝트로 라우팅, CMEK enabled → 수집/분석 불가.
Language & platform
- Go/Java/Node.js/PHP/Python/Ruby/.NET + via client libs, REST, 또는 Cloud Logging.
- Aggregates errors from: App Engine (std/flex), Cloud Run, Cloud Functions, Apps Script, GKE, Compute Engine, Amazon EC2.
Setup (Node.js quick path)
- Enable Error Reporting API.
- Service account: Error Reporting Writer role.
- Install & init client, then
report()
; options로 behavior 조정, message builder로 필드 커스터마이즈.
Env specifics
- Auto-enabled: App Engine std/flex, Cloud Run, Cloud Functions, Apps Script.
- GKE: cluster 생성 시
cloud-platform
scope 추가.
- Compute Engine: 사용 SA에 Writer role.