@codigodoleo/wp-kit 4.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,240 +1,65 @@
1
- # 🏗️ Infraestrutura
1
+ # Infraestrutura
2
2
 
3
- Documentação da infraestrutura do {{projectTitle}} Website, incluindo componentes, configurações e pontos que necessitam detalhamento pela equipe SRE.
3
+ Production infrastructure for **{{projectTitle}}**. This file is a
4
+ skeleton — fill it in as decisions are made and infrastructure is
5
+ provisioned. Keep it close to the truth; out-of-date infra docs cost
6
+ hours during incidents.
4
7
 
5
- ## 🌍 **Visão Geral da Infraestrutura**
8
+ ## Cloud provider
6
9
 
7
- ### **Cloud Provider**
10
+ - **Provider**: `{{ "{{TODO: AWS / GCP / Azure / DigitalOcean / Hetzner / bare metal / ...}}" }}`
11
+ - **Region(s)**: `{{ "{{TODO}}" }}`
12
+ - **Account / project ID**: `{{ "{{TODO}}" }}`
13
+ - **Cost owner**: `{{ "{{TODO: team / cost center}}" }}`
8
14
 
9
- - **Provedor**: Oracle Cloud Infrastructure (OCI)
10
- - **Região**: `[SRE_DETAIL: Especificar região e availability zones]`
11
- - **Recursos principais**: Compute instances, Load Balancer, Block Storage
15
+ ## Network
12
16
 
13
- ### **Arquitetura de Rede**
17
+ - **VPC / CIDR**: `{{ "{{TODO}}" }}`
18
+ - **Subnets**: `{{ "{{TODO: public, private, database tiers}}" }}`
19
+ - **Egress (NAT)**: `{{ "{{TODO}}" }}`
20
+ - **Peerings / VPN**: `{{ "{{TODO}}" }}`
14
21
 
15
- - **VPC**: `[SRE_DETAIL: CIDR blocks e subnets configuradas]`
16
- - **Load Balancer**: OCI Load Balancer
17
- - **CDN**: CloudFlare
18
- - **DNS**: `[SRE_DETAIL: Configuração DNS e subdominios]`
22
+ ## Compute
19
23
 
20
- ## 🎛️ **Kubernetes Cluster**
24
+ - **Runtime platform**: `{{ "{{TODO: Kubernetes / ECS / Fargate / VM / serverless}}" }}`
25
+ - **Sizing**: `{{ "{{TODO: instance class, replica count}}" }}`
26
+ - **Autoscaling**: `{{ "{{TODO: min / max / target metric}}" }}`
27
+ - **Multi-AZ**: `{{ "{{TODO: yes / no, scope}}" }}`
21
28
 
22
- ### **Cluster Configuration**
29
+ ## Persistence
23
30
 
24
- - **Tipo**: `[SRE_DETAIL: Managed ou self-hosted]`
25
- - **Versão**: `[SRE_DETAIL: Versão atual do K8s]`
26
- - **Node Groups**: `[SRE_DETAIL: Tipos de instância e scaling policies]`
27
- - **Networking**: `[SRE_DETAIL: CNI, Network policies, Ingress controller]`
31
+ | Layer | Service | Sizing | Backup |
32
+ | --- | --- | --- | --- |
33
+ | Database | `{{ "{{TODO}}" }}` | `{{ "{{TODO}}" }}` | `{{ "{{TODO: frequency + retention}}" }}` |
34
+ | Object storage | `{{ "{{TODO}}" }}` | n/a | `{{ "{{TODO: versioning / replication}}" }}` |
35
+ | Cache | `{{ "{{TODO}}" }}` | `{{ "{{TODO}}" }}` | n/a |
28
36
 
29
- ### **Namespaces**
37
+ ## Edge
30
38
 
31
- | Namespace | Ambiente | Finalidade |
32
- | -------------- | ----------- | ---------------- |
33
- | `website-dev` | Development | Testes contínuos |
34
- | `website-stg` | Staging | Homologação |
35
- | `website-prod` | Production | Site oficial |
39
+ - **DNS**: `{{ "{{TODO}}" }}`
40
+ - **CDN**: `{{ "{{TODO}}" }}`
41
+ - **TLS certificate management**: `{{ "{{TODO: ACM / Let's Encrypt / Cloudflare}}" }}`
42
+ - **WAF**: `{{ "{{TODO}}" }}`
36
43
 
37
- ### **Recursos por Ambiente**
44
+ ## Secrets and IAM
38
45
 
39
- | Recurso | Development | Staging | Production |
40
- | ------------ | ------------------------------- | ------------------------------- | ---------------------------------- |
41
- | **Replicas** | 1 | 1 | `[SRE_DETAIL: Número de réplicas]` |
42
- | **CPU** | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` |
43
- | **Memory** | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` |
44
- | **Storage** | `[SRE_DETAIL: Tamanho PVC]` | `[SRE_DETAIL: Tamanho PVC]` | `[SRE_DETAIL: Tamanho PVC]` |
46
+ - **Secrets store**: `{{ "{{TODO: cloud secret manager / Vault / env vars}}" }}`
47
+ - **Access model**: `{{ "{{TODO: IAM roles / service accounts / SSH keys}}" }}`
48
+ - **MFA / SSO**: `{{ "{{TODO}}" }}`
45
49
 
46
- ## 💾 **Persistência de Dados**
50
+ ## Infrastructure as code
47
51
 
48
- ### **Banco de Dados**
52
+ - **Tool**: `{{ "{{TODO: Terraform / Pulumi / CloudFormation / Ansible / none}}" }}`
53
+ - **Repository**: `{{ "{{TODO: path or URL of IaC repo}}" }}`
54
+ - **State backend**: `{{ "{{TODO}}" }}`
49
55
 
50
- - **Tipo**: `[SRE_DETAIL: MySQL managed service ou self-hosted]`
51
- - **Versão**: `[SRE_DETAIL: Versão do MySQL]`
52
- - **Configuração**: `[SRE_DETAIL: Instance type, storage, backup policy]`
53
- - **High Availability**: `[SRE_DETAIL: Multi-AZ, read replicas]`
54
- - **Backup**: `[SRE_DETAIL: Frequência, retenção, restore procedures]`
56
+ Keep IaC the source of truth. Hand-edits in the cloud console drift
57
+ silently and cause incidents months later.
55
58
 
56
- ### **Armazenamento de Arquivos**
59
+ ## Observability
57
60
 
58
- - **WordPress Uploads**: `[SRE_DETAIL: Object Storage ou PVC]`
59
- - **Assets Estáticos**: CloudFlare CDN
60
- - **Logs**: `[SRE_DETAIL: Centralized logging solution]`
61
- - **Backup de Arquivos**: `[SRE_DETAIL: Backup strategy para uploads]`
61
+ See [Monitoramento](./Monitoramento.md).
62
62
 
63
- ## 🔐 **Segurança**
63
+ ## Runbooks
64
64
 
65
- ### **Network Security**
66
-
67
- - **Firewall**: `[SRE_DETAIL: Regras de firewall OCI]`
68
- - **WAF**: CloudFlare Web Application Firewall
69
- - **DDoS Protection**: CloudFlare
70
- - **VPN Access**: `[SRE_DETAIL: VPN configuration para acesso interno]`
71
-
72
- ### **Authentication & Authorization**
73
-
74
- - **RBAC**: `[SRE_DETAIL: Kubernetes RBAC policies]`
75
- - **Service Accounts**: `[SRE_DETAIL: K8s service accounts configurados]`
76
- - **Secrets Management**: `[SRE_DETAIL: Kubernetes secrets ou external vault]`
77
- - **Image Security**: `[SRE_DETAIL: Registry scanning, admission controllers]`
78
-
79
- ### **SSL/TLS**
80
-
81
- - **Certificados**: `[SRE_DETAIL: Let's Encrypt ou certificados próprios]`
82
- - **Renovação**: `[SRE_DETAIL: Processo automático de renovação]`
83
- - **Cipher Suites**: `[SRE_DETAIL: Configurações de segurança SSL]`
84
-
85
- ## 📊 **Monitoramento e Observabilidade**
86
-
87
- ### **Monitoring Stack**
88
-
89
- - **Metrics**: `[SRE_DETAIL: Prometheus, CloudWatch, ou OCI Monitoring]`
90
- - **Logging**: `[SRE_DETAIL: ELK, Fluentd, ou solução OCI]`
91
- - **APM**: `[SRE_DETAIL: Application Performance Monitoring solution]`
92
- - **Dashboards**: `[SRE_DETAIL: Grafana ou OCI Console]`
93
-
94
- ### **Alerting**
95
-
96
- - **Notification Channels**: `[SRE_DETAIL: Slack, email, PagerDuty]`
97
- - **Alert Rules**: `[SRE_DETAIL: Métricas críticas e thresholds]`
98
- - **Escalation**: `[SRE_DETAIL: Escalation policies]`
99
- - **Runbooks**: `[SRE_DETAIL: Automated remediation procedures]`
100
-
101
- ### **Health Checks**
102
-
103
- - **Liveness Probes**: `[SRE_DETAIL: Endpoint e configuração]`
104
- - **Readiness Probes**: `[SRE_DETAIL: Endpoint e configuração]`
105
- - **External Monitoring**: `[SRE_DETAIL: Uptime monitoring service]`
106
-
107
- ## 🔄 **Backup e Disaster Recovery**
108
-
109
- ### **Backup Strategy**
110
-
111
- - **Database Backups**: `[SRE_DETAIL: Automated backup schedule]`
112
- - **File System Backups**: `[SRE_DETAIL: PVC snapshot policy]`
113
- - **Configuration Backups**: `[SRE_DETAIL: K8s manifests backup]`
114
- - **Cross-Region Backup**: `[SRE_DETAIL: Geographic redundancy]`
115
-
116
- ### **Disaster Recovery**
117
-
118
- - **RTO (Recovery Time Objective)**: `[SRE_DETAIL: Target recovery time]`
119
- - **RPO (Recovery Point Objective)**: `[SRE_DETAIL: Acceptable data loss]`
120
- - **DR Site**: `[SRE_DETAIL: Secondary region or provider]`
121
- - **Failover Process**: `[SRE_DETAIL: Automated or manual procedures]`
122
-
123
- ## 🚀 **Performance e Scaling**
124
-
125
- ### **Auto Scaling**
126
-
127
- - **HPA (Horizontal Pod Autoscaler)**: `[SRE_DETAIL: Métricas e thresholds]`
128
- - **VPA (Vertical Pod Autoscaler)**: `[SRE_DETAIL: Se habilitado]`
129
- - **Cluster Autoscaler**: `[SRE_DETAIL: Node scaling policies]`
130
- - **Load Testing**: `[SRE_DETAIL: Performance benchmarks]`
131
-
132
- ### **CDN Configuration**
133
-
134
- - **Cache Rules**: `[SRE_DETAIL: CloudFlare cache policies]`
135
- - **Purge Strategy**: `[SRE_DETAIL: Cache invalidation process]`
136
- - **Geographic Distribution**: `[SRE_DETAIL: Edge locations]`
137
- - **Performance Metrics**: `[SRE_DETAIL: CDN analytics e reporting]`
138
-
139
- ## 🔧 **DevOps Tools**
140
-
141
- ### **CI/CD**
142
-
143
- - **GitLab CI/CD**: Pipeline configuration
144
- - **Container Registry**: `[SRE_DETAIL: GitLab Registry ou external]`
145
- - **Image Scanning**: `[SRE_DETAIL: Security scanning tools]`
146
- - **Deployment Strategy**: `[SRE_DETAIL: Blue/Green, Rolling, Canary]`
147
-
148
- ### **Infrastructure as Code**
149
-
150
- - **Terraform**: `[SRE_DETAIL: Estado atual da IaC]`
151
- - **Kubernetes Manifests**: `[SRE_DETAIL: Estrutura dos manifests]`
152
- - **Helm Charts**: `[SRE_DETAIL: Planejamento para migração]`
153
- - **GitOps**: `[SRE_DETAIL: ArgoCD ou similar]`
154
-
155
- ## 🌐 **Rede e Conectividade**
156
-
157
- ### **External Connectivity**
158
-
159
- - **Public IPs**: `[SRE_DETAIL: IP addresses e DNS records]`
160
- - **Domain Management**: `[SRE_DETAIL: DNS provider e configuração]`
161
- - **API Gateways**: `[SRE_DETAIL: Rate limiting, authentication]`
162
- - **Third-party Integrations**: `[SRE_DETAIL: External services connectivity]`
163
-
164
- ### **Internal Networking**
165
-
166
- - **Service Mesh**: `[SRE_DETAIL: Istio, Linkerd, ou similar]`
167
- - **Network Policies**: `[SRE_DETAIL: Pod-to-pod communication rules]`
168
- - **Internal DNS**: `[SRE_DETAIL: CoreDNS configuration]`
169
- - **Service Discovery**: `[SRE_DETAIL: Internal service communication]`
170
-
171
- ## 💰 **Custos e Otimização**
172
-
173
- ### **Cost Management**
174
-
175
- - **Resource Allocation**: `[SRE_DETAIL: Current resource usage]`
176
- - **Cost Monitoring**: `[SRE_DETAIL: Billing alerts e budgets]`
177
- - **Optimization Opportunities**: `[SRE_DETAIL: Right-sizing recommendations]`
178
- - **Reserved Instances**: `[SRE_DETAIL: Long-term commitment strategy]`
179
-
180
- ## 🔄 **Migração para Helm (Planejado)**
181
-
182
- ### **Current State**
183
-
184
- - **Deployment Method**: Kubernetes manifests diretos
185
- - **Configuration Management**: Kustomize ou similar
186
- - **Challenges**: `[SRE_DETAIL: Pontos de dor atuais]`
187
-
188
- ### **Target State**
189
-
190
- - **Helm Version**: 3.x
191
- - **Chart Structure**: `[SRE_DETAIL: Estrutura planejada]`
192
- - **Migration Plan**: `[SRE_DETAIL: Cronograma e etapas]`
193
- - **Benefits Expected**: `[SRE_DETAIL: Melhorias esperadas]`
194
-
195
- ## 📋 **Action Items para SRE**
196
-
197
- ### **🔴 Crítico (Documentação Necessária)**
198
-
199
- - [ ] Especificar configurações de rede (VPC, subnets, security groups)
200
- - [ ] Detalhar configuração do banco de dados (versão, backup, HA)
201
- - [ ] Documentar estratégia de monitoramento e alertas
202
- - [ ] Definir políticas de backup e disaster recovery
203
-
204
- ### **🟡 Importante (Melhoria)**
205
-
206
- - [ ] Implementar Infrastructure as Code com Terraform
207
- - [ ] Configurar monitoring stack completo
208
- - [ ] Estabelecer políticas de auto-scaling
209
- - [ ] Planejar migração para Helm
210
-
211
- ### **🟢 Desejável (Futuro)**
212
-
213
- - [ ] Implementar service mesh
214
- - [ ] Configurar GitOps com ArgoCD
215
- - [ ] Otimizar custos de infraestrutura
216
- - [ ] Implementar chaos engineering
217
-
218
- ## 📞 **Contatos e Responsabilidades**
219
-
220
- ### **Equipes Responsáveis**
221
-
222
- - **SRE Team**: Infraestrutura, monitoramento, DR
223
- - **DevOps Team**: CI/CD, deployments, automação
224
- - **Security Team**: Políticas de segurança, compliance
225
- - **Development Team**: Application requirements, troubleshooting
226
-
227
- ### **Escalation**
228
-
229
- - **Incidentes P1**: `[SRE_DETAIL: Procedimento de escalação]`
230
- - **Mudanças de Infraestrutura**: `[SRE_DETAIL: Change management process]`
231
- - **Emergency Access**: `[SRE_DETAIL: Break-glass procedures]`
232
-
233
- ---
234
-
235
- 📝 **Última atualização**: Junho 2025
236
- ☁️ **Cloud Provider**: Oracle Cloud Infrastructure (OCI)
237
- 🎛️ **Orquestração**: Kubernetes
238
- 🔄 **Estado**: Migração para Helm planejada
239
- 📊 **Documentação SRE**: Detalhamentos técnicos necessários
240
- 🎯 **Próximos passos**: Preenchimento dos `[SRE_DETAIL]` pela equipe especializada
65
+ `{{ "{{TODO: link runbooks for common operations: scaling up, rotating a secret, restoring from backup, swapping the cache, etc.}}" }}`
@@ -1,340 +1,57 @@
1
- # 📊 Monitoramento
1
+ # Monitoramento
2
2
 
3
- Documentação do sistema de monitoramento e observabilidade do {{projectTitle}} Website, incluindo métricas, alertas e pontos que necessitam detalhamento pela equipe SRE.
3
+ Observability and alerting for **{{projectTitle}}**.
4
4
 
5
- ## 🎯 **Visão Geral do Monitoramento**
5
+ ## Goals
6
6
 
7
- ### **Objetivos**
7
+ - Detect issues before users do.
8
+ - Tie every alert to a documented runbook step.
9
+ - Capture enough telemetry to debug incidents *after* they happen, not just before.
8
10
 
9
- - Garantir disponibilidade e performance do site
10
- - Detectar problemas antes que afetem usuários
11
- - Fornecer insights para otimização
12
- - Manter SLAs definidos
11
+ ## Stack
13
12
 
14
- ### **Stack de Observabilidade**
13
+ | Pillar | Tool | Owner |
14
+ | --- | --- | --- |
15
+ | Metrics | `{{ "{{TODO: Prometheus / CloudWatch / Datadog / New Relic / ...}}" }}` | `{{ "{{TODO}}" }}` |
16
+ | Logs | `{{ "{{TODO: CloudWatch Logs / Loki / ELK / Datadog Logs / ...}}" }}` | `{{ "{{TODO}}" }}` |
17
+ | Traces | `{{ "{{TODO: OpenTelemetry / Jaeger / Datadog APM / ...}}" }}` | `{{ "{{TODO}}" }}` |
18
+ | Real user monitoring | `{{ "{{TODO}}" }}` | `{{ "{{TODO}}" }}` |
19
+ | Errors | `{{ "{{TODO: Sentry / Rollbar / Bugsnag / ...}}" }}` | `{{ "{{TODO}}" }}` |
20
+ | Uptime | `{{ "{{TODO: external probe (Pingdom / UptimeRobot / Statuscake / ...)}}" }}` | `{{ "{{TODO}}" }}` |
15
21
 
16
- - **Metrics**: `[SRE_DETAIL: Prometheus, CloudWatch, OCI Monitoring]`
17
- - **Logs**: `[SRE_DETAIL: ELK Stack, Fluentd, OCI Logging]`
18
- - **Traces**: `[SRE_DETAIL: Jaeger, Zipkin, ou APM solution]`
19
- - **Dashboards**: `[SRE_DETAIL: Grafana, OCI Console, ou custom]`
22
+ ## Dashboards
20
23
 
21
- ## 📈 **Métricas Principais**
24
+ `{{ "{{TODO: list and link the dashboards the team actually looks at. A dashboard nobody opens is technical debt, not observability.}}" }}`
22
25
 
23
- ### **Application Metrics**
26
+ ## Service-level objectives (SLOs)
24
27
 
25
- | Métrica | Threshold | Alertas | Responsável |
26
- | ----------------- | ------------------------- | --------------------------- | ----------- |
27
- | **Response Time** | `[SRE_DETAIL: < Xs]` | `[SRE_DETAIL: Alert rules]` | Dev Team |
28
- | **Error Rate** | `[SRE_DETAIL: < X%]` | `[SRE_DETAIL: Alert rules]` | Dev Team |
29
- | **Throughput** | `[SRE_DETAIL: > X req/s]` | `[SRE_DETAIL: Alert rules]` | SRE Team |
30
- | **Availability** | `[SRE_DETAIL: > XX.X%]` | `[SRE_DETAIL: Alert rules]` | SRE Team |
28
+ | Metric | Target | Measurement window |
29
+ | --- | --- | --- |
30
+ | Uptime | `{{ "{{TODO}}" }}` | 30d rolling |
31
+ | p95 latency | `{{ "{{TODO}}" }}` | 30d rolling |
32
+ | Error rate | `{{ "{{TODO}}" }}` | 30d rolling |
31
33
 
32
- ### **Infrastructure Metrics**
34
+ `{{ "{{TODO: define the customer-facing SLI for each SLO. \"Uptime\" without an SLI is not measurable.}}" }}`
33
35
 
34
- | Componente | Métricas Monitoradas | Thresholds |
35
- | ------------------- | ------------------------------- | ----------------------------------- |
36
- | **Kubernetes Pods** | CPU, Memory, Restarts | `[SRE_DETAIL: Limites específicos]` |
37
- | **Database** | Connections, Query time, Locks | `[SRE_DETAIL: Limites específicos]` |
38
- | **Storage** | Disk usage, I/O operations | `[SRE_DETAIL: Limites específicos]` |
39
- | **Network** | Bandwidth, Latency, Packet loss | `[SRE_DETAIL: Limites específicos]` |
36
+ ## Alerts
40
37
 
41
- ### **Business Metrics**
38
+ Every alert needs three things on the alert itself:
42
39
 
43
- - **Page Views**: `[SRE_DETAIL: Tracking method e baseline]`
44
- - **User Sessions**: `[SRE_DETAIL: Analytics integration]`
45
- - **Conversion Rate**: `[SRE_DETAIL: Goals e funnels]`
46
- - **Search Performance**: `[SRE_DETAIL: Internal search metrics]`
40
+ 1. **What is broken** (one line, plain language).
41
+ 2. **Severity** (page now / handle next business day / informational).
42
+ 3. **First step of the runbook** (URL or paste of the first command to run).
47
43
 
48
- ## 🚨 **Sistema de Alertas**
44
+ `{{ "{{TODO: list the alerts wired up today, link each to a runbook section}}" }}`
49
45
 
50
- ### **Níveis de Severidade**
46
+ ## On-call
51
47
 
52
- | Nível | Descrição | Resposta Esperada | Escalação |
53
- | ----------------- | -------------------- | ------------------- | -------------------------------- |
54
- | **P1 - Critical** | Site down, data loss | Imediata (< 15 min) | `[SRE_DETAIL: On-call rotation]` |
55
- | **P2 - High** | Performance degraded | < 1 hora | `[SRE_DETAIL: Team lead]` |
56
- | **P3 - Medium** | Minor issues | < 4 horas | `[SRE_DETAIL: Dev team]` |
57
- | **P4 - Low** | Warnings, capacity | Next business day | `[SRE_DETAIL: Planning]` |
48
+ - **Rotation**: `{{ "{{TODO: who is on, where the schedule lives}}" }}`
49
+ - **Escalation policy**: `{{ "{{TODO}}" }}`
50
+ - **Incident channel**: `{{ "{{TODO: Slack channel, Teams channel, etc.}}" }}`
58
51
 
59
- ### **Canais de Notificação**
52
+ ## Post-mortem template
60
53
 
61
- - **Slack**: `[SRE_DETAIL: Channels configurados (#alerts, #devops)]`
62
- - **Email**: `[SRE_DETAIL: Distribution lists]`
63
- - **PagerDuty**: `[SRE_DETAIL: On-call schedule]`
64
- - **SMS**: `[SRE_DETAIL: Critical alerts only]`
65
-
66
- ### **Alert Rules**
67
-
68
- ```
69
- Site Down (P1):
70
- - HTTP 5xx > 50% por 2 minutos
71
- - [SRE_DETAIL: Specific conditions and thresholds]
72
-
73
- High Response Time (P2):
74
- - Response time > Xs por 5 minutos
75
- - [SRE_DETAIL: Specific conditions and thresholds]
76
-
77
- Database Issues (P1/P2):
78
- - Connection errors > X%
79
- - [SRE_DETAIL: Specific conditions and thresholds]
80
- ```
81
-
82
- ## 📋 **Dashboards**
83
-
84
- ### **Executive Dashboard**
85
-
86
- - **Uptime**: Overall availability
87
- - **Performance**: Average response time
88
- - **User Impact**: Active users, page views
89
- - **Business KPIs**: `[SRE_DETAIL: Specific business metrics]`
90
-
91
- ### **Operations Dashboard**
92
-
93
- - **Infrastructure Health**: Pods, nodes, storage
94
- - **Application Performance**: Response times, errors
95
- - **Security Events**: `[SRE_DETAIL: Security monitoring metrics]`
96
- - **Deployment Status**: `[SRE_DETAIL: CI/CD pipeline metrics]`
97
-
98
- ### **Development Dashboard**
99
-
100
- - **Error Rates**: By endpoint, feature
101
- - **Performance Trends**: Historical data
102
- - **User Experience**: `[SRE_DETAIL: Frontend performance metrics]`
103
- - **API Usage**: `[SRE_DETAIL: API endpoint metrics]`
104
-
105
- ## 🔍 **Health Checks**
106
-
107
- ### **Application Health Checks**
108
-
109
- | Endpoint | Frequency | Timeout | Expected Response |
110
- | ------------------------------- | ------------------ | ------------------ | ------------------------ |
111
- | `/wp-json/wp/v2/` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | HTTP 200 |
112
- | `/wp-admin/admin-ajax.php` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | HTTP 200 |
113
- | `[SRE_DETAIL: Custom endpoint]` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Expected]` |
114
-
115
- ### **External Dependencies**
116
-
117
- - **Database**: `[SRE_DETAIL: Connection check frequency]`
118
- - **CDN (CloudFlare)**: `[SRE_DETAIL: Edge health monitoring]`
119
- - **Third-party APIs**: `[SRE_DETAIL: External service monitoring]`
120
- - **Object Storage**: `[SRE_DETAIL: Storage accessibility check]`
121
-
122
- ### **Kubernetes Health Checks**
123
-
124
- ```yaml
125
- livenessProbe:
126
- # [SRE_DETAIL: Configuração específica]
127
-
128
- readinessProbe:
129
- # [SRE_DETAIL: Configuração específica]
130
-
131
- startupProbe:
132
- # [SRE_DETAIL: Configuração específica]
133
- ```
134
-
135
- ## 📊 **SLIs e SLOs**
136
-
137
- ### **Service Level Indicators (SLIs)**
138
-
139
- | SLI | Medição | Fonte de Dados |
140
- | ---------------- | ------------------------------------ | ----------------------------------- |
141
- | **Availability** | Successful requests / Total requests | `[SRE_DETAIL: Load balancer logs]` |
142
- | **Latency** | Response time < Xms | `[SRE_DETAIL: Application metrics]` |
143
- | **Error Rate** | Error responses / Total responses | `[SRE_DETAIL: Application logs]` |
144
- | **Throughput** | Requests per second | `[SRE_DETAIL: Ingress metrics]` |
145
-
146
- ### **Service Level Objectives (SLOs)**
147
-
148
- | SLO | Target | Measurement Window | Error Budget |
149
- | ----------------- | ------------------------ | ------------------ | ------------------------- |
150
- | **Availability** | `[SRE_DETAIL: 99.X%]` | 30 days | `[SRE_DETAIL: X hours]` |
151
- | **Response Time** | `[SRE_DETAIL: XX% < Xs]` | 24 hours | `[SRE_DETAIL: X% budget]` |
152
- | **Error Rate** | `[SRE_DETAIL: < X%]` | 24 hours | `[SRE_DETAIL: X% budget]` |
153
-
154
- ### **Error Budget Policy**
155
-
156
- - **Budget Remaining > 50%**: `[SRE_DETAIL: Normal operations]`
157
- - **Budget Remaining 10-50%**: `[SRE_DETAIL: Increased monitoring]`
158
- - **Budget Remaining < 10%**: `[SRE_DETAIL: Feature freeze policy]`
159
-
160
- ## 🔐 **Security Monitoring**
161
-
162
- ### **Security Events**
163
-
164
- - **Failed Login Attempts**: `[SRE_DETAIL: Threshold e response]`
165
- - **Unusual Traffic Patterns**: `[SRE_DETAIL: DDoS detection]`
166
- - **File System Changes**: `[SRE_DETAIL: File integrity monitoring]`
167
- - **Privilege Escalation**: `[SRE_DETAIL: RBAC violations]`
168
-
169
- ### **Compliance Monitoring**
170
-
171
- - **Access Logs**: `[SRE_DETAIL: Retention policy]`
172
- - **Data Protection**: `[SRE_DETAIL: GDPR compliance metrics]`
173
- - **Security Patches**: `[SRE_DETAIL: Vulnerability scanning]`
174
- - **Certificate Expiration**: `[SRE_DETAIL: SSL monitoring]`
175
-
176
- ## 📝 **Logging Strategy**
177
-
178
- ### **Log Types**
179
-
180
- | Log Type | Retention | Format | Storage |
181
- | -------------------- | ---------------------- | -------------------------- | ------------------------ |
182
- | **Application Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: JSON/Plain]` | `[SRE_DETAIL: Location]` |
183
- | **Access Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
184
- | **Error Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
185
- | **Security Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
186
-
187
- ### **Log Aggregation**
188
-
189
- - **Collection**: `[SRE_DETAIL: Fluentd, Filebeat, ou similar]`
190
- - **Processing**: `[SRE_DETAIL: Logstash, ou stream processing]`
191
- - **Storage**: `[SRE_DETAIL: Elasticsearch, OCI Logging]`
192
- - **Visualization**: `[SRE_DETAIL: Kibana, Grafana]`
193
-
194
- ### **Log Analysis**
195
-
196
- - **Error Pattern Detection**: `[SRE_DETAIL: Automated analysis]`
197
- - **Performance Insights**: `[SRE_DETAIL: Slow query detection]`
198
- - **Security Analysis**: `[SRE_DETAIL: Threat detection]`
199
- - **Trend Analysis**: `[SRE_DETAIL: Historical patterns]`
200
-
201
- ## 🔄 **Incident Response**
202
-
203
- ### **Runbooks**
204
-
205
- | Cenário | Runbook | Owner | Automation Level |
206
- | --------------------- | --------------------------------- | ------------- | --------------------------- |
207
- | **Site Down** | `[SRE_DETAIL: Link para runbook]` | SRE Team | `[SRE_DETAIL: Manual/Auto]` |
208
- | **High CPU** | `[SRE_DETAIL: Link para runbook]` | Dev Team | `[SRE_DETAIL: Manual/Auto]` |
209
- | **Database Issues** | `[SRE_DETAIL: Link para runbook]` | DBA Team | `[SRE_DETAIL: Manual/Auto]` |
210
- | **Security Incident** | `[SRE_DETAIL: Link para runbook]` | Security Team | `[SRE_DETAIL: Manual/Auto]` |
211
-
212
- ### **Auto-Remediation**
213
-
214
- - **Pod Restart**: `[SRE_DETAIL: Conditions for automatic restart]`
215
- - **Scale Up**: `[SRE_DETAIL: HPA triggers]`
216
- - **Cache Clear**: `[SRE_DETAIL: Performance degradation triggers]`
217
- - **Circuit Breaker**: `[SRE_DETAIL: Dependency failure handling]`
218
-
219
- ### **Escalation Matrix**
220
-
221
- ```
222
- Level 1: On-call Engineer (0-15 min)
223
- Level 2: Team Lead (15-30 min)
224
- Level 3: Manager (30-60 min)
225
- Level 4: Director (60+ min)
226
-
227
- [SRE_DETAIL: Specific contact information and triggers]
228
- ```
229
-
230
- ## 📱 **Synthetic Monitoring**
231
-
232
- ### **Uptime Monitoring**
233
-
234
- - **External Providers**: `[SRE_DETAIL: Pingdom, StatusCake, etc.]`
235
- - **Check Frequency**: `[SRE_DETAIL: Interval]`
236
- - **Global Locations**: `[SRE_DETAIL: Geographic distribution]`
237
- - **Alert Thresholds**: `[SRE_DETAIL: Failure conditions]`
238
-
239
- ### **User Journey Monitoring**
240
-
241
- - **Critical Paths**: `[SRE_DETAIL: Key user flows to monitor]`
242
- - **Performance Budgets**: `[SRE_DETAIL: Load time thresholds]`
243
- - **Browser Testing**: `[SRE_DETAIL: Cross-browser compatibility]`
244
- - **Mobile Monitoring**: `[SRE_DETAIL: Mobile-specific checks]`
245
-
246
- ## 🎯 **Performance Monitoring**
247
-
248
- ### **Frontend Performance**
249
-
250
- - **Core Web Vitals**: `[SRE_DETAIL: LCP, FID, CLS thresholds]`
251
- - **Page Load Times**: `[SRE_DETAIL: Measurement tools]`
252
- - **JavaScript Errors**: `[SRE_DETAIL: Error tracking solution]`
253
- - **User Experience**: `[SRE_DETAIL: Real User Monitoring]`
254
-
255
- ### **Backend Performance**
256
-
257
- - **API Response Times**: `[SRE_DETAIL: Endpoint-specific SLOs]`
258
- - **Database Performance**: `[SRE_DETAIL: Query optimization metrics]`
259
- - **Cache Hit Rates**: `[SRE_DETAIL: CDN and application cache]`
260
- - **Resource Utilization**: `[SRE_DETAIL: CPU, memory, storage trends]`
261
-
262
- ## 📊 **Capacity Planning**
263
-
264
- ### **Growth Metrics**
265
-
266
- - **Traffic Trends**: `[SRE_DETAIL: Historical growth patterns]`
267
- - **Resource Usage**: `[SRE_DETAIL: Infrastructure scaling needs]`
268
- - **Storage Growth**: `[SRE_DETAIL: Data retention and archival]`
269
- - **Cost Optimization**: `[SRE_DETAIL: Resource right-sizing]`
270
-
271
- ### **Forecasting**
272
-
273
- - **Predictive Analysis**: `[SRE_DETAIL: Tools and methodologies]`
274
- - **Seasonal Patterns**: `[SRE_DETAIL: Traffic seasonality]`
275
- - **Scaling Triggers**: `[SRE_DETAIL: Proactive scaling thresholds]`
276
- - **Budget Planning**: `[SRE_DETAIL: Infrastructure cost projections]`
277
-
278
- ## 📋 **Action Items para SRE**
279
-
280
- ### **🔴 Crítico (Implementação Necessária)**
281
-
282
- - [ ] Definir e implementar SLOs específicos para o site
283
- - [ ] Configurar alertas críticos com thresholds apropriados
284
- - [ ] Estabelecer on-call rotation e escalation procedures
285
- - [ ] Implementar health checks abrangentes
286
-
287
- ### **🟡 Importante (Melhoria)**
288
-
289
- - [ ] Configurar dashboards operacionais e executivos
290
- - [ ] Implementar synthetic monitoring externo
291
- - [ ] Estabelecer log aggregation e analysis
292
- - [ ] Criar runbooks para cenários comuns
293
-
294
- ### **🟢 Desejável (Otimização)**
295
-
296
- - [ ] Implementar auto-remediation para problemas comuns
297
- - [ ] Configurar capacity planning automatizado
298
- - [ ] Implementar advanced APM solution
299
- - [ ] Estabelecer chaos engineering practices
300
-
301
- ## 📞 **Responsabilidades e Contatos**
302
-
303
- ### **Monitoring Ownership**
304
-
305
- - **SRE Team**: Infrastructure metrics, alerting, SLOs
306
- - **Development Team**: Application metrics, error tracking
307
- - **Security Team**: Security monitoring, compliance
308
- - **Business Team**: Business metrics, user experience
309
-
310
- ### **Tools and Access**
311
-
312
- - **Monitoring Tools**: `[SRE_DETAIL: Access management]`
313
- - **Alert Management**: `[SRE_DETAIL: Who can modify alerts]`
314
- - **Dashboard Creation**: `[SRE_DETAIL: Self-service capabilities]`
315
- - **Incident Management**: `[SRE_DETAIL: Incident commander rotation]`
316
-
317
- ## 🔄 **Continuous Improvement**
318
-
319
- ### **Monitoring Review Process**
320
-
321
- - **Monthly SLO Review**: `[SRE_DETAIL: Meeting cadence]`
322
- - **Alert Tuning**: `[SRE_DETAIL: Noise reduction process]`
323
- - **Dashboard Optimization**: `[SRE_DETAIL: User feedback integration]`
324
- - **Tool Evaluation**: `[SRE_DETAIL: Technology refresh cycle]`
325
-
326
- ### **Metrics Evolution**
327
-
328
- - **New Metrics**: `[SRE_DETAIL: Request and approval process]`
329
- - **Deprecated Metrics**: `[SRE_DETAIL: Sunset process]`
330
- - **Business Alignment**: `[SRE_DETAIL: KPI alignment reviews]`
331
- - **Industry Benchmarks**: `[SRE_DETAIL: External comparison]`
332
-
333
- ---
334
-
335
- 📝 **Última atualização**: Junho 2025
336
- 📊 **Stack**: `[SRE_DETAIL: Current monitoring stack]`
337
- 🚨 **Alerting**: `[SRE_DETAIL: Primary alerting system]`
338
- 📈 **SLOs**: A serem definidos pela equipe SRE
339
- 🔄 **Estado**: Necessita implementação detalhada
340
- 🎯 **Próximos passos**: Preenchimento dos `[SRE_DETAIL]` e implementação das action items
54
+ After every Sev-1/Sev-2 incident, write a blameless post-mortem under
55
+ `docs/post-mortems/YYYY-MM-DD-short-title.md`. Cover: timeline, impact,
56
+ root cause, what stopped the bleeding, action items (with owners and
57
+ due dates). Action items go into the project tracker the same day.