@radicaltools/mcp 0.3.0 → 0.3.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.
- package/dist/{chunk-Z7THA3L5.js → chunk-2SZDTOYJ.js} +65 -33
- package/dist/{elkLayout-TAUBPPVN.js → elkLayout-VYJDCCIT.js} +1 -1
- package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
- package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +449 -210
- package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
- package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
- package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +287 -131
- package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
- package/dist/hub-catalogue/concern/concern-authentication.radical +247 -37
- package/dist/hub-catalogue/concern/concern-authorization.radical +311 -89
- package/dist/hub-catalogue/concern/concern-availability.radical +287 -63
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +300 -381
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +385 -129
- package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
- package/dist/hub-catalogue/concern/concern-capacity.radical +194 -81
- package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
- package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
- package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
- package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
- package/dist/hub-catalogue/concern/concern-communication-style.radical +473 -167
- package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +339 -308
- package/dist/hub-catalogue/concern/concern-data-store.radical +480 -158
- package/dist/hub-catalogue/concern/concern-decomposition.radical +260 -85
- package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
- package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
- package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
- package/dist/hub-catalogue/concern/concern-deployment.radical +343 -92
- package/dist/hub-catalogue/concern/concern-encryption.radical +339 -76
- package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
- package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +467 -160
- package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +1300 -268
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +88 -51
- package/dist/hub-catalogue/concern/concern-messaging.radical +173 -140
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +162 -159
- package/dist/hub-catalogue/concern/concern-observability.radical +224 -275
- package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
- package/dist/hub-catalogue/concern/concern-personal-data.radical +637 -122
- package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +433 -141
- package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
- package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
- package/dist/hub-catalogue/concern/concern-secrets.radical +332 -74
- package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
- package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
- package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +257 -183
- package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
- package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +271 -137
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +243 -224
- package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
- package/dist/index.js +1001 -230
- package/package.json +1 -1
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
"id": "concern-observability",
|
|
4
4
|
"category": "concern",
|
|
5
5
|
"name": "Observability",
|
|
6
|
-
"description": "Running in production:
|
|
6
|
+
"description": "Running in production: which signals are collected, how the service level indicator is measured, who is alerted and when, how long logs are kept, and how a failure is traced to its cause.",
|
|
7
7
|
"tags": [
|
|
8
8
|
"operations",
|
|
9
9
|
"observability",
|
|
10
|
-
"slo",
|
|
11
10
|
"sli",
|
|
12
11
|
"logging",
|
|
13
12
|
"tracing",
|
|
@@ -19,13 +18,17 @@
|
|
|
19
18
|
"id": "observability",
|
|
20
19
|
"trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
|
|
21
20
|
"why": "these elements run in production, so how you will know they are healthy, and find out why when they are not, has to be decided.",
|
|
22
|
-
"group": "
|
|
21
|
+
"group": "operability"
|
|
23
22
|
},
|
|
24
23
|
"sources": [
|
|
25
24
|
{
|
|
26
25
|
"title": "Google SRE book, chapter 6: Monitoring Distributed Systems",
|
|
27
26
|
"url": "https://sre.google/sre-book/monitoring-distributed-systems/"
|
|
28
27
|
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Google SRE workbook: Implementing SLOs",
|
|
30
|
+
"url": "https://sre.google/workbook/implementing-slos/"
|
|
31
|
+
},
|
|
29
32
|
{
|
|
30
33
|
"title": "Google SRE workbook: Alerting on SLOs",
|
|
31
34
|
"url": "https://sre.google/workbook/alerting-on-slos/"
|
|
@@ -42,6 +45,14 @@
|
|
|
42
45
|
"title": "W3C Trace Context",
|
|
43
46
|
"url": "https://www.w3.org/TR/trace-context/"
|
|
44
47
|
},
|
|
48
|
+
{
|
|
49
|
+
"title": "Kubernetes documentation: Liveness, Readiness and Startup Probes",
|
|
50
|
+
"url": "https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"title": "Prometheus Alertmanager documentation",
|
|
54
|
+
"url": "https://prometheus.io/docs/alerting/latest/alertmanager/"
|
|
55
|
+
},
|
|
45
56
|
{
|
|
46
57
|
"title": "OWASP Logging Cheat Sheet",
|
|
47
58
|
"url": "https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html"
|
|
@@ -66,7 +77,7 @@
|
|
|
66
77
|
},
|
|
67
78
|
{
|
|
68
79
|
"value": "logs",
|
|
69
|
-
"label": "structured logs and metrics
|
|
80
|
+
"label": "structured logs and metrics",
|
|
70
81
|
"description": "Less to run and pay for; a request across elements is followed by its correlation id, by hand. Pick it for a single element with few dependencies, or a team not yet ready to run a tracing backend."
|
|
71
82
|
}
|
|
72
83
|
]
|
|
@@ -74,8 +85,8 @@
|
|
|
74
85
|
{
|
|
75
86
|
"key": "SLI",
|
|
76
87
|
"title": "Measured by",
|
|
77
|
-
"label": "How
|
|
78
|
-
"hint": "
|
|
88
|
+
"label": "How is the availability objective measured?",
|
|
89
|
+
"hint": "The objective and its burn-rate alerts are decided in the Availability pack; this decides the indicator they are computed from, measured where users meet the service.",
|
|
79
90
|
"defaultValue": "request",
|
|
80
91
|
"options": [
|
|
81
92
|
{
|
|
@@ -109,30 +120,11 @@
|
|
|
109
120
|
}
|
|
110
121
|
]
|
|
111
122
|
},
|
|
112
|
-
{
|
|
113
|
-
"key": "LOGS",
|
|
114
|
-
"title": "Personal data",
|
|
115
|
-
"label": "May logs hold personal data?",
|
|
116
|
-
"hint": "Logs are read by many people and tools and kept in places with weaker access than the database; personal data in them is a leak waiting to happen and falls under GDPR all the same.",
|
|
117
|
-
"defaultValue": "redact",
|
|
118
|
-
"options": [
|
|
119
|
-
{
|
|
120
|
-
"value": "redact",
|
|
121
|
-
"label": "no, pseudonymous ids only",
|
|
122
|
-
"description": "Names, e-mail and postal addresses, phone numbers and payment data never reach a log; a user id that means nothing outside the system stands in. Pick it by default, and always when logs go to a SaaS backend or many people can read them."
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"value": "restricted",
|
|
126
|
-
"label": "only in a restricted log store",
|
|
127
|
-
"description": "Support needs to find a customer's requests by what the customer says; personal data goes only to a separate store with role-based access, every read recorded and a short retention. Pick it only with a lawful basis for it and a named owner."
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
123
|
{
|
|
132
124
|
"key": "SAMPLING",
|
|
133
125
|
"title": "Trace sampling",
|
|
134
126
|
"label": "Which traces are kept?",
|
|
135
|
-
"hint": "Every trace kept costs storage; the ones that explain failures are a small share of them.
|
|
127
|
+
"hint": "Every trace kept costs storage; the ones that explain failures are a small share of them. Only when the signals are logs, metrics and traces (OpenTelemetry).",
|
|
136
128
|
"defaultValue": "tail",
|
|
137
129
|
"options": [
|
|
138
130
|
{
|
|
@@ -143,7 +135,7 @@
|
|
|
143
135
|
{
|
|
144
136
|
"value": "tail",
|
|
145
137
|
"label": "tail sampling",
|
|
146
|
-
"description": "The Collector waits for a whole trace and keeps every one with an error or slower than the
|
|
138
|
+
"description": "The Collector waits for a whole trace and keeps every one with an error or slower than the limit, plus a share of the rest. Pick it when errors are rare and each one must be explainable."
|
|
147
139
|
},
|
|
148
140
|
{
|
|
149
141
|
"value": "all",
|
|
@@ -152,18 +144,6 @@
|
|
|
152
144
|
}
|
|
153
145
|
]
|
|
154
146
|
},
|
|
155
|
-
{
|
|
156
|
-
"key": "AVAILABILITY",
|
|
157
|
-
"label": "Availability promised (%, per 30 days)",
|
|
158
|
-
"defaultValue": "99.9",
|
|
159
|
-
"type": "number"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"key": "P95_MS",
|
|
163
|
-
"label": "Response time at the 95th percentile (ms)",
|
|
164
|
-
"defaultValue": "500",
|
|
165
|
-
"type": "number"
|
|
166
|
-
},
|
|
167
147
|
{
|
|
168
148
|
"key": "LOG_DAYS",
|
|
169
149
|
"label": "How long are logs kept (days)?",
|
|
@@ -172,9 +152,15 @@
|
|
|
172
152
|
},
|
|
173
153
|
{
|
|
174
154
|
"key": "SAMPLE_PERCENT",
|
|
175
|
-
"label": "Share of ordinary traces kept (%)",
|
|
155
|
+
"label": "Share of ordinary traces kept (%). Only with OpenTelemetry and head or tail sampling",
|
|
176
156
|
"defaultValue": "10",
|
|
177
157
|
"type": "number"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"key": "SLOW_TRACE_MS",
|
|
161
|
+
"label": "A trace slower than this is always kept (ms); set it at the latency objective decided in the Capacity and scaling pack. Only with OpenTelemetry and tail sampling",
|
|
162
|
+
"defaultValue": "500",
|
|
163
|
+
"type": "number"
|
|
178
164
|
}
|
|
179
165
|
]
|
|
180
166
|
},
|
|
@@ -187,26 +173,16 @@
|
|
|
187
173
|
"y": 0,
|
|
188
174
|
"kind": "brief",
|
|
189
175
|
"source": "Hub concern pack: Observability",
|
|
190
|
-
"description": "The system runs in production for its users. Someone must know when it is unhealthy before users say so, be woken only for what matters, and find the cause of a failure across elements quickly
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"id": "req-slo",
|
|
194
|
-
"type": "requirement",
|
|
195
|
-
"label": "Service levels met",
|
|
196
|
-
"x": 260,
|
|
197
|
-
"y": 0,
|
|
198
|
-
"ears_type": "ubiquitous",
|
|
199
|
-
"action": "meet {{AVAILABILITY}} % availability and a 95th percentile response time of {{P95_MS}} ms in every 30-day window, measured by {{SLI}}",
|
|
200
|
-
"rationale": "A number everyone agrees on, measured as users see it, decides when to alert and when to slow down changes (Google SRE book, chapter 4; SRE workbook, Implementing SLOs)."
|
|
176
|
+
"description": "The system runs in production for its users. Someone must know when it is unhealthy before users say so, be woken only for what matters, and find the cause of a failure across elements quickly. The indicator the objective is computed from must measure what users see, and what is collected must not cost more than it explains."
|
|
201
177
|
},
|
|
202
178
|
{
|
|
203
179
|
"id": "req-sli-request",
|
|
204
180
|
"type": "requirement",
|
|
205
181
|
"label": "Good requests counted",
|
|
206
182
|
"x": 260,
|
|
207
|
-
"y":
|
|
183
|
+
"y": 0,
|
|
208
184
|
"ears_type": "ubiquitous",
|
|
209
|
-
"action": "count a request as good when it is valid and answered without a 5xx
|
|
185
|
+
"action": "count a request as good when it is valid and answered without a 5xx, at the load balancer or the server's edge, leave 4xx answers out as invalid, and record the good and total rates as the indicator the Availability pack's objective is measured with",
|
|
210
186
|
"rationale": "Measured at the edge, the indicator sees what users see, including failures the element never logs (Google SRE workbook, Implementing SLOs).",
|
|
211
187
|
"hubWhen": {
|
|
212
188
|
"SLI": [
|
|
@@ -219,9 +195,9 @@
|
|
|
219
195
|
"type": "requirement",
|
|
220
196
|
"label": "Probed from outside",
|
|
221
197
|
"x": 260,
|
|
222
|
-
"y":
|
|
198
|
+
"y": 130,
|
|
223
199
|
"ears_type": "ubiquitous",
|
|
224
|
-
"action": "be probed every minute from at least 2 locations outside its own network by a check that exercises a real read path, and count a minute as down when the probes from 2 locations fail",
|
|
200
|
+
"action": "be probed every minute from at least 2 locations outside its own network by a check that exercises a real read path, and count a minute as down, in the indicator the Availability pack's objective is measured with, when the probes from 2 locations fail",
|
|
225
201
|
"rationale": "With little traffic a ratio of requests is noise; probes measure availability whether or not users are there (Google SRE book, chapter 6, black-box monitoring).",
|
|
226
202
|
"hubWhen": {
|
|
227
203
|
"SLI": [
|
|
@@ -232,20 +208,20 @@
|
|
|
232
208
|
{
|
|
233
209
|
"id": "req-alert",
|
|
234
210
|
"type": "requirement",
|
|
235
|
-
"label": "
|
|
211
|
+
"label": "Burn-rate alerts reach people",
|
|
236
212
|
"x": 260,
|
|
237
|
-
"y":
|
|
213
|
+
"y": 260,
|
|
238
214
|
"ears_type": "event-driven",
|
|
239
|
-
"trigger": "
|
|
240
|
-
"action": "
|
|
241
|
-
"rationale": "Multiwindow burn-rate alerts catch fast outages within minutes and slow leaks within hours
|
|
215
|
+
"trigger": "a burn-rate alert generated for the objective decided in the Availability pack fires",
|
|
216
|
+
"action": "deliver it to {{ONCALL}} with the service level, the burn rate and a link to the runbook, and route an alert on a cause users do not feel to a ticket, never to a person",
|
|
217
|
+
"rationale": "Multiwindow burn-rate alerts catch fast outages within minutes and slow leaks within hours; routing decides whether anyone acts on them (Google SRE workbook, Alerting on SLOs)."
|
|
242
218
|
},
|
|
243
219
|
{
|
|
244
220
|
"id": "req-escalate",
|
|
245
221
|
"type": "requirement",
|
|
246
222
|
"label": "Pages escalate",
|
|
247
223
|
"x": 260,
|
|
248
|
-
"y":
|
|
224
|
+
"y": 390,
|
|
249
225
|
"ears_type": "event-driven",
|
|
250
226
|
"trigger": "a page is not acknowledged within 5 minutes",
|
|
251
227
|
"action": "escalate it to the secondary on-call, and after another 10 minutes to the team lead, at any hour",
|
|
@@ -261,10 +237,10 @@
|
|
|
261
237
|
"type": "requirement",
|
|
262
238
|
"label": "Out-of-hours alerts wait",
|
|
263
239
|
"x": 260,
|
|
264
|
-
"y":
|
|
240
|
+
"y": 520,
|
|
265
241
|
"ears_type": "state-driven",
|
|
266
242
|
"precondition": "outside working hours",
|
|
267
|
-
"action": "turn alerts into tickets for the next working day instead of calling anyone, and show the outage on the status page within
|
|
243
|
+
"action": "turn alerts into tickets for the next working day instead of calling anyone, and show the outage on the status page within 1 minute of the alert",
|
|
268
244
|
"rationale": "Without on-call, users still need to know the service is down and that it is known; the ticket makes sure the morning starts with it.",
|
|
269
245
|
"hubWhen": {
|
|
270
246
|
"ONCALL": [
|
|
@@ -273,53 +249,23 @@
|
|
|
273
249
|
}
|
|
274
250
|
},
|
|
275
251
|
{
|
|
276
|
-
"id": "req-
|
|
277
|
-
"type": "requirement",
|
|
278
|
-
"label": "Logs structured and clean",
|
|
279
|
-
"x": 260,
|
|
280
|
-
"y": 780,
|
|
281
|
-
"ears_type": "ubiquitous",
|
|
282
|
-
"action": "write structured (JSON) log lines to standard output, each with the trace or correlation id of its request, never with a secret, token or password, and delete them after {{LOG_DAYS}} days",
|
|
283
|
-
"rationale": "Logs are searched across elements and copied to places with weaker access; a bounded retention limits both cost and what a leak exposes (OWASP Logging Cheat Sheet; The Twelve-Factor App, XI)."
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"id": "req-pii-redact",
|
|
287
|
-
"type": "requirement",
|
|
288
|
-
"label": "No personal data logged",
|
|
289
|
-
"x": 260,
|
|
290
|
-
"y": 910,
|
|
291
|
-
"ears_type": "ubiquitous",
|
|
292
|
-
"action": "keep names, e-mail and postal addresses, phone numbers and payment data out of logs, traces and metric labels, writing a pseudonymous user id instead",
|
|
293
|
-
"rationale": "Personal data in logs is processed under GDPR like anywhere else, and logs are the copy nobody remembers to delete (OWASP Logging Cheat Sheet, data to exclude).",
|
|
294
|
-
"hubWhen": {
|
|
295
|
-
"LOGS": [
|
|
296
|
-
"redact"
|
|
297
|
-
]
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
"id": "req-pii-restricted",
|
|
252
|
+
"id": "req-retention",
|
|
302
253
|
"type": "requirement",
|
|
303
|
-
"label": "
|
|
254
|
+
"label": "Logs deleted after retention",
|
|
304
255
|
"x": 260,
|
|
305
|
-
"y":
|
|
256
|
+
"y": 650,
|
|
306
257
|
"ears_type": "ubiquitous",
|
|
307
|
-
"action": "
|
|
308
|
-
"rationale": "
|
|
309
|
-
"hubWhen": {
|
|
310
|
-
"LOGS": [
|
|
311
|
-
"restricted"
|
|
312
|
-
]
|
|
313
|
-
}
|
|
258
|
+
"action": "keep its log lines for {{LOG_DAYS}} days and no longer, deleted by the log store, not by hand",
|
|
259
|
+
"rationale": "A bounded retention limits both cost and what a leak exposes; logs are the copy nobody remembers to delete (OWASP Logging Cheat Sheet; The Twelve-Factor App, XI)."
|
|
314
260
|
},
|
|
315
261
|
{
|
|
316
262
|
"id": "req-trace",
|
|
317
263
|
"type": "requirement",
|
|
318
264
|
"label": "Requests traced",
|
|
319
265
|
"x": 260,
|
|
320
|
-
"y":
|
|
266
|
+
"y": 780,
|
|
321
267
|
"ears_type": "ubiquitous",
|
|
322
|
-
"action": "propagate the W3C Trace Context (traceparent) through every call it makes, to other elements, outside systems and messages on queues",
|
|
268
|
+
"action": "propagate the W3C Trace Context (traceparent) through every call it makes, to other elements, outside systems and messages on queues, with a client span for each",
|
|
323
269
|
"rationale": "A slow request is explained by where its time went; one broken link in the propagation splits the trace (W3C Trace Context).",
|
|
324
270
|
"hubWhen": {
|
|
325
271
|
"SIGNALS": [
|
|
@@ -332,9 +278,9 @@
|
|
|
332
278
|
"type": "requirement",
|
|
333
279
|
"label": "Traces sampled at the start",
|
|
334
280
|
"x": 260,
|
|
335
|
-
"y":
|
|
281
|
+
"y": 910,
|
|
336
282
|
"ears_type": "ubiquitous",
|
|
337
|
-
"action": "keep {{SAMPLE_PERCENT}} % of traces, decided once at the first element and followed by every element after it
|
|
283
|
+
"action": "keep {{SAMPLE_PERCENT}} % of traces, decided once by the SDK at the first element (parent-based sampling with a trace-id ratio) and followed by every element after it",
|
|
338
284
|
"rationale": "A decision made once keeps traces whole; each element choosing on its own leaves fragments (OpenTelemetry, Sampling).",
|
|
339
285
|
"hubWhen": {
|
|
340
286
|
"SIGNALS": [
|
|
@@ -350,10 +296,10 @@
|
|
|
350
296
|
"type": "requirement",
|
|
351
297
|
"label": "Failing traces kept",
|
|
352
298
|
"x": 260,
|
|
353
|
-
"y":
|
|
299
|
+
"y": 1040,
|
|
354
300
|
"ears_type": "event-driven",
|
|
355
301
|
"trigger": "a trace completes",
|
|
356
|
-
"action": "keep it when any span has an error or the trace took longer than {{
|
|
302
|
+
"action": "keep it when any span has an error or the trace took longer than {{SLOW_TRACE_MS}} ms, and keep {{SAMPLE_PERCENT}} % of the rest",
|
|
357
303
|
"rationale": "The traces that explain failures are rare; deciding after the trace is complete keeps every one of them at a fraction of the cost (OpenTelemetry, Sampling).",
|
|
358
304
|
"hubWhen": {
|
|
359
305
|
"SIGNALS": [
|
|
@@ -369,9 +315,9 @@
|
|
|
369
315
|
"type": "requirement",
|
|
370
316
|
"label": "Every trace kept",
|
|
371
317
|
"x": 260,
|
|
372
|
-
"y":
|
|
318
|
+
"y": 1170,
|
|
373
319
|
"ears_type": "ubiquitous",
|
|
374
|
-
"action": "keep every trace for at least 7 days",
|
|
320
|
+
"action": "keep every trace for at least 7 days, with no sampling in the SDK or the Collector",
|
|
375
321
|
"rationale": "At low traffic the cost is small and any request, not only failing ones, may need explaining.",
|
|
376
322
|
"hubWhen": {
|
|
377
323
|
"SIGNALS": [
|
|
@@ -387,30 +333,20 @@
|
|
|
387
333
|
"type": "requirement",
|
|
388
334
|
"label": "Health reported",
|
|
389
335
|
"x": 260,
|
|
390
|
-
"y":
|
|
336
|
+
"y": 1300,
|
|
391
337
|
"ears_type": "ubiquitous",
|
|
392
338
|
"action": "answer a liveness check that fails only when it must be restarted, and a readiness check that fails while it cannot serve, which the platform uses to restart it and route traffic",
|
|
393
|
-
"rationale": "The platform restarts what hangs and routes around what is not ready; a liveness check that follows a dependency restarts everything when that dependency fails (Kubernetes documentation,
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"id": "sc-slo",
|
|
397
|
-
"type": "scenario",
|
|
398
|
-
"label": "Levels measured",
|
|
399
|
-
"x": 520,
|
|
400
|
-
"y": 0,
|
|
401
|
-
"given": "30 days of production traffic",
|
|
402
|
-
"when": "availability and the 95th percentile are computed",
|
|
403
|
-
"then": "they are at least {{AVAILABILITY}} % and at most {{P95_MS}} ms"
|
|
339
|
+
"rationale": "The platform restarts what hangs and routes around what is not ready; a liveness check that follows a dependency restarts everything when that dependency fails (Kubernetes documentation, Liveness, Readiness and Startup Probes)."
|
|
404
340
|
},
|
|
405
341
|
{
|
|
406
342
|
"id": "sc-sli-request",
|
|
407
343
|
"type": "scenario",
|
|
408
344
|
"label": "Good and bad counted",
|
|
409
345
|
"x": 520,
|
|
410
|
-
"y":
|
|
411
|
-
"given": "requests answered with 200
|
|
346
|
+
"y": 0,
|
|
347
|
+
"given": "requests answered with 200, 500 and 404",
|
|
412
348
|
"when": "the indicator is computed",
|
|
413
|
-
"then": "
|
|
349
|
+
"then": "the 200 is good, the 500 is bad, and the 404 is left out as invalid",
|
|
414
350
|
"hubWhen": {
|
|
415
351
|
"SLI": [
|
|
416
352
|
"request"
|
|
@@ -422,10 +358,10 @@
|
|
|
422
358
|
"type": "scenario",
|
|
423
359
|
"label": "Outage seen by probes",
|
|
424
360
|
"x": 520,
|
|
425
|
-
"y":
|
|
361
|
+
"y": 130,
|
|
426
362
|
"given": "probes in two locations",
|
|
427
363
|
"when": "the element stops answering at night with no users",
|
|
428
|
-
"then": "the minutes are counted as down
|
|
364
|
+
"then": "the minutes are counted as down in the indicator",
|
|
429
365
|
"hubWhen": {
|
|
430
366
|
"SLI": [
|
|
431
367
|
"probes"
|
|
@@ -435,19 +371,19 @@
|
|
|
435
371
|
{
|
|
436
372
|
"id": "sc-alert",
|
|
437
373
|
"type": "scenario",
|
|
438
|
-
"label": "
|
|
374
|
+
"label": "Outage alerts",
|
|
439
375
|
"x": 520,
|
|
440
|
-
"y":
|
|
441
|
-
"given": "
|
|
442
|
-
"when": "
|
|
443
|
-
"then": "the people alerted get
|
|
376
|
+
"y": 260,
|
|
377
|
+
"given": "every request failing",
|
|
378
|
+
"when": "the fast burn-rate alert fires",
|
|
379
|
+
"then": "the people alerted get it with the runbook link, and a cause alert from the same minute became a ticket"
|
|
444
380
|
},
|
|
445
381
|
{
|
|
446
382
|
"id": "sc-escalate",
|
|
447
383
|
"type": "scenario",
|
|
448
384
|
"label": "Missed page escalates",
|
|
449
385
|
"x": 520,
|
|
450
|
-
"y":
|
|
386
|
+
"y": 390,
|
|
451
387
|
"given": "a page sent at night",
|
|
452
388
|
"when": "the primary does not acknowledge it within 5 minutes",
|
|
453
389
|
"then": "the secondary is paged, and the team lead 10 minutes later",
|
|
@@ -462,10 +398,10 @@
|
|
|
462
398
|
"type": "scenario",
|
|
463
399
|
"label": "Night outage",
|
|
464
400
|
"x": 520,
|
|
465
|
-
"y":
|
|
401
|
+
"y": 520,
|
|
466
402
|
"given": "an outage at 23:00",
|
|
467
403
|
"when": "the burn-rate alert fires",
|
|
468
|
-
"then": "nobody is called, a ticket waits for the morning, and the status page shows the outage within
|
|
404
|
+
"then": "nobody is called, a ticket waits for the morning, and the status page shows the outage within 1 minute of the alert",
|
|
469
405
|
"hubWhen": {
|
|
470
406
|
"ONCALL": [
|
|
471
407
|
"hours"
|
|
@@ -473,51 +409,21 @@
|
|
|
473
409
|
}
|
|
474
410
|
},
|
|
475
411
|
{
|
|
476
|
-
"id": "sc-
|
|
477
|
-
"type": "scenario",
|
|
478
|
-
"label": "Request found in logs",
|
|
479
|
-
"x": 520,
|
|
480
|
-
"y": 780,
|
|
481
|
-
"given": "a request that fails",
|
|
482
|
-
"when": "its trace or correlation id is searched",
|
|
483
|
-
"then": "every log line of it is found, none with a secret, and none older than {{LOG_DAYS}} days is kept"
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
"id": "sc-pii-redact",
|
|
487
|
-
"type": "scenario",
|
|
488
|
-
"label": "Sign-up logged clean",
|
|
489
|
-
"x": 520,
|
|
490
|
-
"y": 910,
|
|
491
|
-
"given": "a customer signing up with name, e-mail and phone",
|
|
492
|
-
"when": "the request's log lines and spans are read",
|
|
493
|
-
"then": "none holds the name, e-mail or phone; the user id is there",
|
|
494
|
-
"hubWhen": {
|
|
495
|
-
"LOGS": [
|
|
496
|
-
"redact"
|
|
497
|
-
]
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
"id": "sc-pii-restricted",
|
|
412
|
+
"id": "sc-retention",
|
|
502
413
|
"type": "scenario",
|
|
503
|
-
"label": "
|
|
414
|
+
"label": "Old lines gone",
|
|
504
415
|
"x": 520,
|
|
505
|
-
"y":
|
|
506
|
-
"given": "
|
|
507
|
-
"when": "
|
|
508
|
-
"then": "
|
|
509
|
-
"hubWhen": {
|
|
510
|
-
"LOGS": [
|
|
511
|
-
"restricted"
|
|
512
|
-
]
|
|
513
|
-
}
|
|
416
|
+
"y": 650,
|
|
417
|
+
"given": "the log store",
|
|
418
|
+
"when": "lines older than {{LOG_DAYS}} days are queried",
|
|
419
|
+
"then": "none is returned"
|
|
514
420
|
},
|
|
515
421
|
{
|
|
516
422
|
"id": "sc-trace",
|
|
517
423
|
"type": "scenario",
|
|
518
424
|
"label": "Slow request explained",
|
|
519
425
|
"x": 520,
|
|
520
|
-
"y":
|
|
426
|
+
"y": 780,
|
|
521
427
|
"given": "a request slowed by one downstream call",
|
|
522
428
|
"when": "its trace is opened",
|
|
523
429
|
"then": "the slow call is visible with its timing, in the same trace as the request",
|
|
@@ -532,7 +438,7 @@
|
|
|
532
438
|
"type": "scenario",
|
|
533
439
|
"label": "Traces whole",
|
|
534
440
|
"x": 520,
|
|
535
|
-
"y":
|
|
441
|
+
"y": 910,
|
|
536
442
|
"given": "10 000 requests across three elements",
|
|
537
443
|
"when": "the kept traces are counted",
|
|
538
444
|
"then": "about {{SAMPLE_PERCENT}} % are kept and each kept trace has the spans of all three elements",
|
|
@@ -550,7 +456,7 @@
|
|
|
550
456
|
"type": "scenario",
|
|
551
457
|
"label": "Error trace kept",
|
|
552
458
|
"x": 520,
|
|
553
|
-
"y":
|
|
459
|
+
"y": 1040,
|
|
554
460
|
"given": "a thousand traces of which three have an error",
|
|
555
461
|
"when": "they pass the Collector",
|
|
556
462
|
"then": "all three are kept, and about {{SAMPLE_PERCENT}} % of the others",
|
|
@@ -568,7 +474,7 @@
|
|
|
568
474
|
"type": "scenario",
|
|
569
475
|
"label": "Any request traced",
|
|
570
476
|
"x": 520,
|
|
571
|
-
"y":
|
|
477
|
+
"y": 1170,
|
|
572
478
|
"given": "a request a customer complains about 5 days later",
|
|
573
479
|
"when": "its trace is looked up by its id",
|
|
574
480
|
"then": "it is there",
|
|
@@ -586,7 +492,7 @@
|
|
|
586
492
|
"type": "scenario",
|
|
587
493
|
"label": "Hung instance replaced",
|
|
588
494
|
"x": 520,
|
|
589
|
-
"y":
|
|
495
|
+
"y": 1300,
|
|
590
496
|
"given": "an instance that stops answering",
|
|
591
497
|
"when": "its liveness check fails",
|
|
592
498
|
"then": "the platform restarts it, and no traffic reached it once its readiness check failed"
|
|
@@ -600,9 +506,9 @@
|
|
|
600
506
|
"concern": "observability",
|
|
601
507
|
"status": "accepted",
|
|
602
508
|
"date": "",
|
|
603
|
-
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id;
|
|
604
|
-
"decision": "The element emits logs, metrics and traces with the OpenTelemetry SDK of its language (auto-instrumentation for the HTTP server, clients, database and queue libraries), propagating the W3C Trace Context on every call and message. Signals go to an OpenTelemetry Collector, which
|
|
605
|
-
"consequences": "• One standard for all three signals, and any backend that speaks OTLP.\n• Every element and library on a request's path must pass the trace context on, queues included, or traces break.\n• Trace volume needs a sampling policy
|
|
509
|
+
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id; and keeping every log line and every trace forever costs more than the failures they explain. The availability objective itself, and the burn-rate alerts generated for it, are decided in the Availability pack; what a log line holds and never holds in the Error handling and logging conventions pack. The snippets of this pack assume the element is order-api, scraped by Prometheus as job order-api and deployed to the shop namespace; rename them for yours.",
|
|
510
|
+
"decision": "The element emits logs, metrics and traces with the OpenTelemetry SDK of its language (auto-instrumentation for the HTTP server, clients, database and queue libraries), propagating the W3C Trace Context on every call and message. Signals go to an OpenTelemetry Collector, which removes attributes that must not leave and exports to the backend. Trace sampling: {{SAMPLING}}; a head decision is made by the SDK at the first element and followed by the rest, while tail sampling and keeping every trace are the Collector's to do. Choose the backend by what the team already runs, cost per GB ingested and where the data may be kept: the Grafana stack (Tempo, Loki, Mimir or Prometheus) self-hosted or in Grafana Cloud, Elastic, Honeycomb, Datadog or New Relic; the Collector keeps that choice reversible. The availability objective and its burn-rate alerts are decided in the Availability pack and measured with {{SLI}}; alerts reach {{ONCALL}}. Log lines: shaped and redacted as decided in the Error handling and logging conventions pack; logs kept {{LOG_DAYS}} days.",
|
|
511
|
+
"consequences": "• One standard for all three signals, and any backend that speaks OTLP.\n• Every element and library on a request's path must pass the trace context on, queues included, or traces break.\n• Trace volume needs a sampling policy; tail sampling needs a Collector that buffers whole traces.\n• The Collector is one more component to run, scale and upgrade.",
|
|
606
512
|
"alternatives": "1. Structured logs and metrics only: less to run, but slower to explain failures across elements.\n2. A vendor's own agent (Datadog, Dynatrace): more automatic, but every signal is tied to that vendor and its pricing.",
|
|
607
513
|
"hubWhen": {
|
|
608
514
|
"SIGNALS": [
|
|
@@ -619,8 +525,8 @@
|
|
|
619
525
|
"concern": "observability",
|
|
620
526
|
"status": "accepted",
|
|
621
527
|
"date": "",
|
|
622
|
-
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id;
|
|
623
|
-
"decision": "The element writes structured JSON log lines to standard output, each with a correlation id taken from the incoming X-Request-ID or traceparent header or created at the edge, and passes that id on in every call it makes. It exposes request rate, errors and duration as
|
|
528
|
+
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id; and keeping every log line and every trace forever costs more than the failures they explain. The availability objective itself, and the burn-rate alerts generated for it, are decided in the Availability pack; what a log line holds and never holds in the Error handling and logging conventions pack. The snippets of this pack assume the element is order-api, scraped by Prometheus as job order-api and deployed to the shop namespace; rename them for yours.",
|
|
529
|
+
"decision": "The element writes structured JSON log lines to standard output, each with a correlation id taken from the incoming X-Request-ID or traceparent header or created at the edge, and passes that id on in every call it makes. It exposes request rate, errors and duration as the OpenTelemetry HTTP server metric (http.server.request.duration, which Prometheus scrapes as http_server_request_duration_seconds with the label http_response_status_code) on its own endpoint, through the OpenTelemetry metrics SDK with its Prometheus exporter; the indicator queries read that name. A framework's own metrics (Micrometer's http_server_requests_seconds with the label status) are fine too, with the indicator queries rewritten for them. A shipper (Fluent Bit, Vector or Grafana Alloy) sends the logs to the log store: Loki, Elasticsearch or OpenSearch, or the cloud's own (CloudWatch Logs, Azure Monitor Logs). No tracing. The availability objective and its burn-rate alerts are decided in the Availability pack and measured with {{SLI}}; alerts reach {{ONCALL}}. Log lines: shaped and redacted as decided in the Error handling and logging conventions pack; logs kept {{LOG_DAYS}} days.",
|
|
624
530
|
"consequences": "• Less to run and to pay for than three signals.\n• A request across elements is followed by its correlation id, by hand, and where its time went is guessed from timestamps.\n• Adding tracing later is easier if the correlation id is already the traceparent.",
|
|
625
531
|
"alternatives": "1. OpenTelemetry with traces: more to run, but a slow request explains itself.\n2. Unstructured text logs: nothing to set up, but they cannot be searched or counted reliably.",
|
|
626
532
|
"hubWhen": {
|
|
@@ -638,8 +544,8 @@
|
|
|
638
544
|
"concern": "observability",
|
|
639
545
|
"status": "accepted",
|
|
640
546
|
"date": "",
|
|
641
|
-
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id;
|
|
642
|
-
"decision": "An on-call rotation is paged at any hour when the error budget burns fast, and acknowledges within 5 minutes; unacknowledged pages escalate to the secondary and
|
|
547
|
+
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id; and keeping every log line and every trace forever costs more than the failures they explain. The availability objective itself, and the burn-rate alerts generated for it, are decided in the Availability pack; what a log line holds and never holds in the Error handling and logging conventions pack. The snippets of this pack assume the element is order-api, scraped by Prometheus as job order-api and deployed to the shop namespace; rename them for yours.",
|
|
548
|
+
"decision": "An on-call rotation is paged at any hour when the error budget burns fast, and acknowledges within 5 minutes; unacknowledged pages escalate to the secondary after 5 minutes and to the team lead 10 minutes later. The rotation runs in PagerDuty, incident.io On-call, Grafana IRM or Jira Service Management (not Opsgenie, whose support Atlassian ends on 5 April 2027), fed by Alertmanager (or the backend's alerting); the escalation policy is kept in Terraform. Only symptoms page (the multiwindow burn-rate alerts generated for the objective decided in the Availability pack); causes such as a full disk or a restarting pod become tickets. Every alert links its runbook, which is checked as the Operational readiness pack decides. The rotation is large enough that each engineer is on call at most one week in four, and time on call is paid or given back.",
|
|
643
549
|
"consequences": "• Outages at night are handled at night; a target of 99.9 % or more becomes reachable.\n• On-call costs money and people's evenings; noisy alerts burn the rotation out, so every page that needed no action is fixed or removed.\n• Runbooks have to exist and be kept current.",
|
|
644
550
|
"alternatives": "1. Alerts in working hours only: cheaper, but a night outage lasts until the morning.\n2. A follow-the-sun rotation across time zones: nobody is woken, but it needs teams in several regions.",
|
|
645
551
|
"hubWhen": {
|
|
@@ -657,9 +563,9 @@
|
|
|
657
563
|
"concern": "observability",
|
|
658
564
|
"status": "accepted",
|
|
659
565
|
"date": "",
|
|
660
|
-
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id;
|
|
661
|
-
"decision": "Burn-rate alerts reach the team in working hours through the team channel (Slack or Microsoft Teams) and a mobile notification; outside working hours, Alertmanager's time intervals route them to tickets for the next working day instead.
|
|
662
|
-
"consequences": "• Nobody is woken; no on-call cost.\n• An outage at night lasts until the morning: one such night can use a month's budget at
|
|
566
|
+
"context": "This element runs in production. The forces: users notice an outage before a team without signals does; healthy needs a number agreed in advance, measured as users see it; alerts on every cause wake people for nothing until they are ignored, while alerts on symptoms that burn the error budget are worth acting on; a request crosses several elements, and its trail is lost without a shared id; and keeping every log line and every trace forever costs more than the failures they explain. The availability objective itself, and the burn-rate alerts generated for it, are decided in the Availability pack; what a log line holds and never holds in the Error handling and logging conventions pack. The snippets of this pack assume the element is order-api, scraped by Prometheus as job order-api and deployed to the shop namespace; rename them for yours.",
|
|
567
|
+
"decision": "Burn-rate alerts reach the team in working hours through the team channel (Slack or Microsoft Teams) and a mobile notification; outside working hours, Alertmanager's time intervals route them to tickets for the next working day instead. The same alerts reach the status page's incoming webhook (Instatus, or a small bridge to Atlassian Statuspage's incidents API) within 1 minute of firing, so users know the outage is known. Only symptoms alert; every alert links its runbook, which is checked as the Operational readiness pack decides.",
|
|
568
|
+
"consequences": "• Nobody is woken; no on-call cost.\n• An outage at night lasts until the morning: one such night can use a month's budget at 99.9 %, which the objective decided in the Availability pack must allow.\n• The status page carries the communication outside hours.",
|
|
663
569
|
"alternatives": "1. An on-call rotation around the clock: night outages are fixed at night, at the cost of a paid rotation.\n2. Best effort by whoever sees the alert: no cost, no promise, and burnout of the conscientious few.",
|
|
664
570
|
"hubWhen": {
|
|
665
571
|
"ONCALL": [
|
|
@@ -668,14 +574,17 @@
|
|
|
668
574
|
}
|
|
669
575
|
},
|
|
670
576
|
{
|
|
671
|
-
"id": "ff-
|
|
577
|
+
"id": "ff-sli-request",
|
|
672
578
|
"type": "fitness-fn",
|
|
673
|
-
"label": "
|
|
579
|
+
"label": "Request indicator recorded",
|
|
674
580
|
"x": 1040,
|
|
675
581
|
"y": 0,
|
|
676
|
-
"
|
|
677
|
-
"
|
|
678
|
-
"
|
|
582
|
+
"characteristic": "reliability",
|
|
583
|
+
"scope": "atomic",
|
|
584
|
+
"cadence": "triggered",
|
|
585
|
+
"trigger": "pull-request",
|
|
586
|
+
"invocation": "automated",
|
|
587
|
+
"description": "Recording rules in the repository compute the good and total request rates from the server's request histogram, leaving 4xx answers out; promtool runs a unit test over them in the pipeline with synthetic series, so a change that counts a 500 as good or a 404 as a request fails the build. The Availability pack's SLO spec uses the same queries. The metric is the OpenTelemetry HTTP server metric as Prometheus names it; for Micrometer, read http_server_requests_seconds_count with the label status instead, in the rules and the test alike.\n\nThreshold: The good and total request rates are recorded from the edge metrics; a unit test over the rules counts a 200 as good, a 500 as bad and a 404 as invalid\n\nTool: promtool test rules (Prometheus)\n\n```yaml\n# sli.rules.yaml\ngroups:\n - name: order-api-sli\n rules:\n - record: order_api:requests_total:rate5m\n labels: { service: order-api }\n expr: sum(rate(http_server_request_duration_seconds_count{job=\"order-api\",http_response_status_code!~\"4..\"}[5m]))\n - record: order_api:requests_good:rate5m\n labels: { service: order-api }\n expr: sum(rate(http_server_request_duration_seconds_count{job=\"order-api\",http_response_status_code!~\"4..|5..\"}[5m]))\n---\n# sli.test.yaml (CI: promtool test rules sli.test.yaml)\nrule_files: [sli.rules.yaml]\nevaluation_interval: 1m\ntests:\n - interval: 1m\n input_series:\n - series: 'http_server_request_duration_seconds_count{job=\"order-api\",http_response_status_code=\"200\"}'\n values: '0+90x10' # 1.5 good requests per second\n - series: 'http_server_request_duration_seconds_count{job=\"order-api\",http_response_status_code=\"500\"}'\n values: '0+30x10' # 0.5 failed requests per second\n - series: 'http_server_request_duration_seconds_count{job=\"order-api\",http_response_status_code=\"404\"}'\n values: '0+60x10' # invalid: left out of both rates\n promql_expr_test:\n - expr: order_api:requests_good:rate5m / order_api:requests_total:rate5m\n eval_time: 10m\n exp_samples:\n - labels: '{service=\"order-api\"}'\n value: 0.75\n```",
|
|
679
588
|
"hubWhen": {
|
|
680
589
|
"SLI": [
|
|
681
590
|
"request"
|
|
@@ -688,9 +597,11 @@
|
|
|
688
597
|
"label": "Probes measure availability",
|
|
689
598
|
"x": 1040,
|
|
690
599
|
"y": 130,
|
|
691
|
-
"
|
|
692
|
-
"
|
|
693
|
-
"
|
|
600
|
+
"characteristic": "reliability",
|
|
601
|
+
"scope": "holistic",
|
|
602
|
+
"cadence": "continual",
|
|
603
|
+
"invocation": "automated",
|
|
604
|
+
"description": "A Blackbox exporter runs in each of at least two locations outside the element's network and probes a real read path every minute; one central Prometheus scrapes both exporters with a location label per target, so the recording rule sees every location in one evaluation and marks a minute down when two or more fail. The recorded series is the raw indicator the Availability pack's SLO spec reads.\n\nThreshold: A probe every 60 s from at least 2 locations outside the network, scraped by one Prometheus; a minute is recorded as down when 2 or more locations fail it\n\nTool: Prometheus Blackbox exporter, scraped by one central Prometheus\n\n```yaml\n# blackbox.yml (in each probe location)\nmodules:\n orders_read:\n prober: http\n timeout: 5s\n http:\n valid_status_codes: [200]\n fail_if_body_not_matches_regexp: ['\"orders\":']\n---\n# prometheus.yml of the central Prometheus: one job per exporter location, same target\nscrape_configs:\n - job_name: blackbox-order-api-eu-west\n scrape_interval: 60s\n metrics_path: /probe\n params: { module: [orders_read] }\n static_configs: [{ targets: [\"https://shop.example.com/api/orders?probe=1\"], labels: { location: eu-west } }]\n relabel_configs:\n - { source_labels: [__address__], target_label: __param_target }\n - { source_labels: [__param_target], target_label: instance }\n - { target_label: __address__, replacement: \"blackbox-eu-west.probes.example.net:9115\" }\n - job_name: blackbox-order-api-us-east\n scrape_interval: 60s\n metrics_path: /probe\n params: { module: [orders_read] }\n static_configs: [{ targets: [\"https://shop.example.com/api/orders?probe=1\"], labels: { location: us-east } }]\n relabel_configs:\n - { source_labels: [__address__], target_label: __param_target }\n - { source_labels: [__param_target], target_label: instance }\n - { target_label: __address__, replacement: \"blackbox-us-east.probes.example.net:9115\" }\n---\n# rules: a minute is down when 2 or more locations fail it\ngroups:\n - name: probe-sli\n rules:\n - record: order_api:probe_up:minute\n expr: (count(probe_success{job=~\"blackbox-order-api-.*\"} == 0) or vector(0)) < bool 2\n# The Availability pack's SLO spec reads it as a raw indicator:\n# sli: { raw: { error_ratio_query: 1 - avg_over_time(order_api:probe_up:minute[{{.window}}]) } }\n```",
|
|
694
605
|
"hubWhen": {
|
|
695
606
|
"SLI": [
|
|
696
607
|
"probes"
|
|
@@ -703,9 +614,12 @@
|
|
|
703
614
|
"label": "Pages reach on-call",
|
|
704
615
|
"x": 1040,
|
|
705
616
|
"y": 260,
|
|
706
|
-
"
|
|
707
|
-
"
|
|
708
|
-
"
|
|
617
|
+
"characteristic": "reliability",
|
|
618
|
+
"scope": "atomic",
|
|
619
|
+
"cadence": "triggered",
|
|
620
|
+
"trigger": "pull-request",
|
|
621
|
+
"invocation": "automated",
|
|
622
|
+
"description": "A pipeline step tests the Alertmanager routing tree whenever its configuration changes: page alerts must reach the on-call receiver (PagerDuty), ticket alerts must not.\n\nThreshold: Every alert with severity page routes to the on-call receiver; 0 cause alerts (severity ticket) do; the configuration is valid\n\nTool: amtool (Prometheus Alertmanager)\n\n```yaml\n# alertmanager.yml (excerpt)\nroute:\n receiver: tickets\n routes:\n - matchers: [ 'severity=\"page\"' ]\n receiver: pagerduty-oncall\nreceivers:\n - name: pagerduty-oncall\n pagerduty_configs: [{ routing_key_file: /etc/alertmanager/pagerduty-key }]\n - name: tickets\n webhook_configs: [{ url: \"https://tickets.example.com/alertmanager\" }]\n---\n# CI step\n- run: |\n amtool check-config alertmanager.yml\n # --verify.receivers compares the matched receivers comma-joined in route order\n amtool config routes test --config.file=alertmanager.yml --verify.receivers=pagerduty-oncall severity=page service=order-api\n amtool config routes test --config.file=alertmanager.yml --verify.receivers=tickets severity=ticket service=order-api\n```",
|
|
709
623
|
"hubWhen": {
|
|
710
624
|
"ONCALL": [
|
|
711
625
|
"oncall"
|
|
@@ -713,29 +627,40 @@
|
|
|
713
627
|
}
|
|
714
628
|
},
|
|
715
629
|
{
|
|
716
|
-
"id": "ff-
|
|
630
|
+
"id": "ff-escalation",
|
|
717
631
|
"type": "fitness-fn",
|
|
718
|
-
"label": "
|
|
632
|
+
"label": "Escalation policy as code",
|
|
719
633
|
"x": 1040,
|
|
720
634
|
"y": 390,
|
|
721
|
-
"
|
|
722
|
-
"
|
|
723
|
-
"
|
|
635
|
+
"characteristic": "reliability",
|
|
636
|
+
"scope": "atomic",
|
|
637
|
+
"cadence": "triggered",
|
|
638
|
+
"trigger": "pull-request",
|
|
639
|
+
"invocation": "automated",
|
|
640
|
+
"description": "The PagerDuty escalation policy is kept in Terraform with the delays the decision names; the pipeline validates it on every change and a nightly plan fails on drift, so a delay changed by hand in the console is caught. incident.io On-call (the incident-io/incident provider), Grafana IRM (the grafana/grafana provider's grafana_oncall_* resources) and Jira Service Management (the atlassian/atlassian-operations provider) have Terraform providers with the same shape; Opsgenie is left out because Atlassian ends its support on 5 April 2027.\n\nThreshold: The escalation policy in Terraform escalates after 5 minutes to the secondary and after 10 more to the team lead; terraform plan reports no drift from it\n\nTool: Terraform with the PagerDuty provider (terraform plan -detailed-exitcode)\n\n```hcl\nresource \"pagerduty_escalation_policy\" \"order_api\" {\n name = \"Order API\"\n num_loops = 2\n\n rule { # primary on-call; after 5 minutes unacknowledged, the next rule\n escalation_delay_in_minutes = 5\n target {\n type = \"schedule_reference\"\n id = pagerduty_schedule.primary.id\n }\n }\n rule { # secondary; after 10 more minutes, the team lead\n escalation_delay_in_minutes = 10\n target {\n type = \"schedule_reference\"\n id = pagerduty_schedule.secondary.id\n }\n }\n rule {\n escalation_delay_in_minutes = 10\n target {\n type = \"user_reference\"\n id = pagerduty_user.team_lead.id\n }\n }\n}\n# CI: terraform validate; nightly: terraform plan -detailed-exitcode (2 = drift, fails the job)\n```",
|
|
724
641
|
"hubWhen": {
|
|
725
642
|
"ONCALL": [
|
|
726
|
-
"
|
|
643
|
+
"oncall"
|
|
727
644
|
]
|
|
728
645
|
}
|
|
729
646
|
},
|
|
730
647
|
{
|
|
731
|
-
"id": "ff-
|
|
648
|
+
"id": "ff-hours-routing",
|
|
732
649
|
"type": "fitness-fn",
|
|
733
|
-
"label": "
|
|
650
|
+
"label": "Night alerts become tickets, the status page knows",
|
|
734
651
|
"x": 1040,
|
|
735
652
|
"y": 520,
|
|
736
|
-
"
|
|
737
|
-
"
|
|
738
|
-
"
|
|
653
|
+
"characteristic": "reliability",
|
|
654
|
+
"scope": "atomic",
|
|
655
|
+
"cadence": "triggered",
|
|
656
|
+
"trigger": "pull-request",
|
|
657
|
+
"invocation": "automated",
|
|
658
|
+
"description": "The Alertmanager routing sends page alerts to the status page's webhook within a minute, to the team channel during the working-hours time interval and to tickets outside it; a pipeline step validates the configuration and the receivers with amtool whenever it changes, and reads the status-page route's group_wait with yq. --verify.receivers compares the receivers comma-joined in route order, so the list follows the order of the routes. amtool does not evaluate time intervals, so the channel-or-ticket split is confirmed once after a change by adding a test alert (amtool alert add severity=page) outside hours and seeing the ticket.\n\nThreshold: Page alerts match the status-page, team-channel and tickets receivers in the routing tree, in that order; the status-page route sets group_wait to at most 1 minute; the configuration is valid\n\nTool: amtool (Prometheus Alertmanager time intervals) and yq\n\n```yaml\n# alertmanager.yml (excerpt)\ntime_intervals:\n - name: working-hours\n time_intervals:\n - weekdays: ['monday:friday']\n times: [{ start_time: '08:00', end_time: '18:00' }]\n location: 'Europe/Warsaw'\nroute:\n receiver: tickets\n routes:\n - matchers: [ 'severity=\"page\"' ]\n receiver: status-page\n group_wait: 1m\n continue: true\n - matchers: [ 'severity=\"page\"' ]\n receiver: team-channel\n active_time_intervals: [working-hours]\n continue: true\n - matchers: [ 'severity=\"page\"' ]\n receiver: tickets\n mute_time_intervals: [working-hours]\nreceivers:\n - name: status-page\n webhook_configs: [{ url: \"https://status.example.com/incoming/alertmanager\" }]\n - name: team-channel\n slack_configs: [{ channel: \"#shop-alerts\", api_url_file: /etc/alertmanager/slack-url }]\n - name: tickets\n webhook_configs: [{ url: \"https://tickets.example.com/alertmanager\" }]\n---\n# CI step\n- run: |\n amtool check-config alertmanager.yml\n # the receivers in route order, comma-joined: the check is order-sensitive\n amtool config routes test --config.file=alertmanager.yml --verify.receivers=status-page,team-channel,tickets severity=page\n wait=$(yq '.route.routes[] | select(.receiver == \"status-page\") | .group_wait' alertmanager.yml)\n [[ \"$wait\" =~ ^([0-9]|[1-5][0-9]|60)s$|^1m$ ]] || { echo \"status-page route waits $wait, more than 1 minute\"; exit 1; }\n```",
|
|
659
|
+
"hubWhen": {
|
|
660
|
+
"ONCALL": [
|
|
661
|
+
"hours"
|
|
662
|
+
]
|
|
663
|
+
}
|
|
739
664
|
},
|
|
740
665
|
{
|
|
741
666
|
"id": "ff-retention",
|
|
@@ -743,9 +668,12 @@
|
|
|
743
668
|
"label": "Log retention enforced",
|
|
744
669
|
"x": 1040,
|
|
745
670
|
"y": 650,
|
|
746
|
-
"
|
|
747
|
-
"
|
|
748
|
-
"
|
|
671
|
+
"characteristic": "maintainability",
|
|
672
|
+
"scope": "atomic",
|
|
673
|
+
"cadence": "temporal",
|
|
674
|
+
"every": "30d",
|
|
675
|
+
"invocation": "automated",
|
|
676
|
+
"description": "The log store's retention is in the repository and reviewed; a monthly job queries the day before the retention boundary (one day of slack for the compactor's delete delay) and fails when any line comes back. CloudWatch Logs and Elasticsearch ILM take the same number; the query step uses their CLI instead of logcli.\n\nThreshold: Retention set to {{LOG_DAYS}} days in the log store; a monthly query for lines older than {{LOG_DAYS}} days plus 1 returns 0 lines\n\nTool: Grafana Loki (compactor retention) and logcli in a scheduled job\n\n```yaml\n# loki config (excerpt)\ncompactor:\n working_directory: /loki/compactor\n retention_enabled: true\n delete_request_store: s3\nlimits_config:\n retention_period: {{LOG_DAYS}}d\n---\n# .github/workflows/log-retention.yml\nname: log-retention\non:\n schedule: [{ cron: '0 6 1 * *' }]\njobs:\n oldest-line:\n runs-on: ubuntu-latest\n steps:\n - env: { LOKI_ADDR: https://loki.example.internal }\n run: |\n from=$(date -u -d \"-$(( {{LOG_DAYS}} + 2 )) days\" +%FT%TZ)\n to=$(date -u -d \"-$(( {{LOG_DAYS}} + 1 )) days\" +%FT%TZ)\n lines=$(logcli query '{service_name=\"order-api\"}' --quiet --output=raw --limit=1 --from=\"$from\" --to=\"$to\" | wc -l)\n test \"$lines\" -eq 0 || { echo \"::error::log lines older than {{LOG_DAYS}} days are still kept\"; exit 1; }\n```"
|
|
749
677
|
},
|
|
750
678
|
{
|
|
751
679
|
"id": "ff-trace-propagation",
|
|
@@ -753,24 +681,51 @@
|
|
|
753
681
|
"label": "Traces stay whole",
|
|
754
682
|
"x": 1040,
|
|
755
683
|
"y": 780,
|
|
756
|
-
"
|
|
757
|
-
"
|
|
758
|
-
"
|
|
684
|
+
"characteristic": "maintainability",
|
|
685
|
+
"scope": "atomic",
|
|
686
|
+
"cadence": "triggered",
|
|
687
|
+
"trigger": "pull-request",
|
|
688
|
+
"invocation": "automated",
|
|
689
|
+
"description": "An integration test registers the HTTP instrumentation before the app is loaded, serves the app on a port of its own, sends it a request with a known traceparent, lets the element make its outgoing calls to a stub, and checks that every finished span carries that trace id, that there is a client span per call, and that the stub received the traceparent header on each. The instrumentation patches http in the test process too, so the test's own request to the app is excluded by its port (ignoreOutgoingRequestHook): otherwise it would get a client span in a fresh trace and its traceparent would be overwritten. Under Vitest the modules are ES modules, which the instrumentation does not see being loaded; requiring node:http once after registering applies the patch to the module object the app shares (an app that imports named functions from node:http needs the instrumentation's ESM hook, node --import with @opentelemetry/instrumentation/hook.mjs, instead).\n\nThreshold: A request through the element and its outgoing calls yields exactly 1 trace id, with as many client spans as outgoing calls, each carrying the traceparent\n\nTool: Vitest with supertest, the OpenTelemetry InMemorySpanExporter and HttpInstrumentation (OpenTelemetry JS SDK 2.x); for the JVM: the OpenTelemetry Java agent's testing exporter with JUnit 5\n\n```ts\nimport http from 'node:http'\nimport { createRequire } from 'node:module'\nimport type { AddressInfo } from 'node:net'\nimport { SpanKind } from '@opentelemetry/api'\nimport { registerInstrumentations } from '@opentelemetry/instrumentation'\nimport { HttpInstrumentation } from '@opentelemetry/instrumentation-http'\nimport { InMemorySpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'\nimport { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'\nimport request from 'supertest'\nimport { afterAll, expect, it, vi } from 'vitest'\n\nconst exporter = new InMemorySpanExporter()\nconst provider = new NodeTracerProvider({ spanProcessors: [new SimpleSpanProcessor(exporter)] })\nprovider.register()\nlet appPort = -1\nregisterInstrumentations({ instrumentations: [new HttpInstrumentation({\n ignoreOutgoingRequestHook: (req) => Number(req.port) === appPort, // the test's own request is not one of the element's calls\n})] })\ncreateRequire(import.meta.url)('node:http') // the instrumentation patches on require: the app and the test share this module\nconst { app } = await import('../src/app') // loaded after the instrumentation, so http is patched\nconst { stub } = await import('./stubs/partner') // records every request the element sends it\nconst server = http.createServer(app).listen(0)\nappPort = (server.address() as AddressInfo).port\nafterAll(() => { server.close() })\n\nit('keeps one trace across the element and its outgoing calls', async () => {\n const traceId = '4bf92f3577b34da6a3ce929d0e0e4736'\n exporter.reset()\n await request(server).get('/orders/42').set('traceparent', `00-${traceId}-00f067aa0ba902b7-01`).expect(200)\n await vi.waitFor(() => expect(exporter.getFinishedSpans().some((s) => s.kind === SpanKind.SERVER)).toBe(true))\n const spans = exporter.getFinishedSpans()\n expect(new Set(spans.map((s) => s.spanContext().traceId))).toEqual(new Set([traceId]))\n expect(spans.filter((s) => s.kind === SpanKind.CLIENT)).toHaveLength(stub.requests.length)\n expect(stub.requests.length).toBeGreaterThan(0)\n for (const r of stub.requests) expect(r.headers.traceparent).toContain(traceId)\n})\n```",
|
|
759
690
|
"hubWhen": {
|
|
760
691
|
"SIGNALS": [
|
|
761
692
|
"otel"
|
|
762
693
|
]
|
|
763
694
|
}
|
|
764
695
|
},
|
|
696
|
+
{
|
|
697
|
+
"id": "ff-head-sampling",
|
|
698
|
+
"type": "fitness-fn",
|
|
699
|
+
"label": "SDK samples at the root",
|
|
700
|
+
"x": 1040,
|
|
701
|
+
"y": 910,
|
|
702
|
+
"characteristic": "maintainability",
|
|
703
|
+
"scope": "atomic",
|
|
704
|
+
"cadence": "triggered",
|
|
705
|
+
"trigger": "pull-request",
|
|
706
|
+
"invocation": "automated",
|
|
707
|
+
"description": "A policy over all the rendered manifests at once fails the pipeline when a container does not configure the SDK's parent-based trace-id-ratio sampler with the agreed share; parent-based means only the first element decides and the others follow. A value is read from env (value, or valueFrom.configMapKeyRef) or from a ConfigMap the container takes whole with envFrom, so the ConfigMaps must be among the manifests checked; an unset ratio counts as the SDK's default of 1. On other platforms the same two variables go in the service's environment and the same check reads it.\n\nThreshold: Every container of the element's Deployments, StatefulSets and DaemonSets sets OTEL_TRACES_SAMPLER=parentbased_traceidratio and OTEL_TRACES_SAMPLER_ARG to {{SAMPLE_PERCENT}} / 100, directly or from a ConfigMap in the same manifests\n\nTool: Conftest (Open Policy Agent, rego.v1): conftest test --combine manifests/\n\n```rego\n# conftest test --combine manifests/\npackage main\n\nimport rego.v1\n\ndocs contains d if { some f in input; is_array(f.contents); some d in f.contents }\ndocs contains d if { some f in input; is_object(f.contents); d := f.contents }\n\nworkloads contains w if { some w in docs; w.kind in {\"Deployment\", \"StatefulSet\", \"DaemonSet\"} }\n\nconfig_map(name) := object.get(cm, \"data\", {}) if { some cm in docs; cm.kind == \"ConfigMap\"; cm.metadata.name == name }\n\nhas_env(c, name) if { some e in c.env; e.name == name }\n\nenv_value(c, name) := v if { some e in c.env; e.name == name; v := e.value }\nenv_value(c, name) := v if {\n some e in c.env\n e.name == name\n ref := e.valueFrom.configMapKeyRef\n entries := config_map(ref.name)\n v := entries[ref.key]\n}\nenv_value(c, name) := v if {\n not has_env(c, name)\n some f in c.envFrom\n entries := config_map(f.configMapRef.name)\n v := entries[name]\n}\n\nsampler_arg(c) := to_number(env_value(c, \"OTEL_TRACES_SAMPLER_ARG\"))\nsampler_arg(c) := 1 if not env_value(c, \"OTEL_TRACES_SAMPLER_ARG\") # the SDK's default\n\ndeny contains msg if {\n some w in workloads\n some c in w.spec.template.spec.containers\n not env_value(c, \"OTEL_TRACES_SAMPLER\") == \"parentbased_traceidratio\"\n msg := sprintf(\"%s/%s: container %s must set OTEL_TRACES_SAMPLER=parentbased_traceidratio\", [w.kind, w.metadata.name, c.name])\n}\n\ndeny contains msg if {\n some w in workloads\n some c in w.spec.template.spec.containers\n sampler_arg(c) != {{SAMPLE_PERCENT}} / 100\n msg := sprintf(\"%s/%s: container %s must set OTEL_TRACES_SAMPLER_ARG to {{SAMPLE_PERCENT}} / 100\", [w.kind, w.metadata.name, c.name])\n}\n```",
|
|
708
|
+
"hubWhen": {
|
|
709
|
+
"SIGNALS": [
|
|
710
|
+
"otel"
|
|
711
|
+
],
|
|
712
|
+
"SAMPLING": [
|
|
713
|
+
"head"
|
|
714
|
+
]
|
|
715
|
+
}
|
|
716
|
+
},
|
|
765
717
|
{
|
|
766
718
|
"id": "ff-tail-sampling",
|
|
767
719
|
"type": "fitness-fn",
|
|
768
720
|
"label": "Error traces always kept",
|
|
769
721
|
"x": 1040,
|
|
770
|
-
"y":
|
|
771
|
-
"
|
|
772
|
-
"
|
|
773
|
-
"
|
|
722
|
+
"y": 1040,
|
|
723
|
+
"characteristic": "maintainability",
|
|
724
|
+
"scope": "atomic",
|
|
725
|
+
"cadence": "triggered",
|
|
726
|
+
"trigger": "pull-request",
|
|
727
|
+
"invocation": "automated",
|
|
728
|
+
"description": "The Collector's configuration, with its tail sampling policy, is kept in the repository whole (receivers, processors, exporters and the traces pipeline) and validated with the Collector's own validate command in the pipeline, so a mistyped field or a component the pipeline names but nobody defines fails the build before it runs; reviewing the policy against the threshold is part of the change.\n\nThreshold: The Collector's tail sampling policy keeps traces with an error status or slower than {{SLOW_TRACE_MS}} ms and {{SAMPLE_PERCENT}} % of the rest; the configuration validates\n\nTool: OpenTelemetry Collector contrib (tail_sampling processor; otelcol-contrib validate)\n\n```yaml\n# collector.yaml (CI: otelcol-contrib validate --config=collector.yaml)\nreceivers:\n otlp:\n protocols:\n grpc: { endpoint: 0.0.0.0:4317 }\n http: { endpoint: 0.0.0.0:4318 }\nprocessors:\n batch: {}\n tail_sampling:\n decision_wait: 10s\n num_traces: 100000\n policies:\n - name: errors\n type: status_code\n status_code: { status_codes: [ERROR] }\n - name: slow\n type: latency\n latency: { threshold_ms: {{SLOW_TRACE_MS}} }\n - name: the-rest\n type: probabilistic\n probabilistic: { sampling_percentage: {{SAMPLE_PERCENT}} }\nexporters:\n otlp:\n endpoint: tempo-distributor.observability.svc:4317 # your trace backend\n tls: { insecure: true } # inside the cluster; TLS as the Encryption pack decides\nservice:\n pipelines:\n traces:\n receivers: [otlp]\n processors: [tail_sampling, batch]\n exporters: [otlp]\n```",
|
|
774
729
|
"hubWhen": {
|
|
775
730
|
"SIGNALS": [
|
|
776
731
|
"otel"
|
|
@@ -780,24 +735,42 @@
|
|
|
780
735
|
]
|
|
781
736
|
}
|
|
782
737
|
},
|
|
738
|
+
{
|
|
739
|
+
"id": "ff-keep-all",
|
|
740
|
+
"type": "fitness-fn",
|
|
741
|
+
"label": "Nothing sampled, kept 7 days",
|
|
742
|
+
"x": 1040,
|
|
743
|
+
"y": 1170,
|
|
744
|
+
"characteristic": "maintainability",
|
|
745
|
+
"scope": "atomic",
|
|
746
|
+
"cadence": "triggered",
|
|
747
|
+
"trigger": "pull-request",
|
|
748
|
+
"invocation": "automated",
|
|
749
|
+
"description": "A pipeline step reads the element's manifest, the Collector configuration and the trace store's configuration from the repository and fails when any of the three would drop or expire traces early. For a hosted backend, the retention check reads the backend's settings API instead.\n\nThreshold: Every container of the element (at least one) sets the SDK sampler to always_on, the Collector's traces pipeline has no sampling processor, and the trace store keeps blocks for at least 168 h\n\nTool: yq in the CI pipeline (Grafana Tempo for the trace store)\n\n```bash\n# every container of the element samples nothing away\n# (at least one container, and each sets OTEL_TRACES_SAMPLER=always_on itself)\nyq -e '(.spec.template.spec.containers | length > 0) and (.spec.template.spec.containers | all_c((.env // []) | any_c(.name == \"OTEL_TRACES_SAMPLER\" and .value == \"always_on\")))' k8s/order-api.yaml\n# the Collector's traces pipeline has no sampling processor\nyq -e '[.service.pipelines.traces.processors[] | select(test(\"sampl\"))] | length == 0' collector.yaml\n# Tempo keeps blocks for at least 7 days (168h)\nyq -e '.compactor.compaction.block_retention | sub(\"h\", \"\") | tonumber >= 168' tempo.yaml\n```",
|
|
750
|
+
"hubWhen": {
|
|
751
|
+
"SIGNALS": [
|
|
752
|
+
"otel"
|
|
753
|
+
],
|
|
754
|
+
"SAMPLING": [
|
|
755
|
+
"all"
|
|
756
|
+
]
|
|
757
|
+
}
|
|
758
|
+
},
|
|
783
759
|
{
|
|
784
760
|
"id": "ff-health",
|
|
785
761
|
"type": "fitness-fn",
|
|
786
762
|
"label": "Probes declared",
|
|
787
763
|
"x": 1040,
|
|
788
|
-
"y":
|
|
789
|
-
"
|
|
790
|
-
"
|
|
791
|
-
"
|
|
764
|
+
"y": 1300,
|
|
765
|
+
"characteristic": "reliability",
|
|
766
|
+
"scope": "atomic",
|
|
767
|
+
"cadence": "triggered",
|
|
768
|
+
"trigger": "pull-request",
|
|
769
|
+
"invocation": "automated",
|
|
770
|
+
"description": "A policy over the Kubernetes manifests fails the pipeline when a container of the element has no liveness or no readiness probe. On a managed runtime, the health check path of the service is set in its configuration and the same policy reads that.\n\nThreshold: 0 deployed containers without a liveness and a readiness probe\n\nTool: Conftest (Open Policy Agent)\n\n```rego\npackage main\n\nimport rego.v1\n\ndeny contains msg if {\n input.kind == \"Deployment\"\n some c in input.spec.template.spec.containers\n not c.livenessProbe\n msg := sprintf(\"%s: container %s has no livenessProbe\", [input.metadata.name, c.name])\n}\n\ndeny contains msg if {\n input.kind == \"Deployment\"\n some c in input.spec.template.spec.containers\n not c.readinessProbe\n msg := sprintf(\"%s: container %s has no readinessProbe\", [input.metadata.name, c.name])\n}\n```"
|
|
792
771
|
}
|
|
793
772
|
],
|
|
794
773
|
"relations": [
|
|
795
|
-
{
|
|
796
|
-
"id": "req-slo--derives--need",
|
|
797
|
-
"sourceId": "req-slo",
|
|
798
|
-
"targetId": "need",
|
|
799
|
-
"relationType": "derives"
|
|
800
|
-
},
|
|
801
774
|
{
|
|
802
775
|
"id": "req-sli-request--derives--need",
|
|
803
776
|
"sourceId": "req-sli-request",
|
|
@@ -829,20 +802,8 @@
|
|
|
829
802
|
"relationType": "derives"
|
|
830
803
|
},
|
|
831
804
|
{
|
|
832
|
-
"id": "req-
|
|
833
|
-
"sourceId": "req-
|
|
834
|
-
"targetId": "need",
|
|
835
|
-
"relationType": "derives"
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
"id": "req-pii-redact--derives--need",
|
|
839
|
-
"sourceId": "req-pii-redact",
|
|
840
|
-
"targetId": "need",
|
|
841
|
-
"relationType": "derives"
|
|
842
|
-
},
|
|
843
|
-
{
|
|
844
|
-
"id": "req-pii-restricted--derives--need",
|
|
845
|
-
"sourceId": "req-pii-restricted",
|
|
805
|
+
"id": "req-retention--derives--need",
|
|
806
|
+
"sourceId": "req-retention",
|
|
846
807
|
"targetId": "need",
|
|
847
808
|
"relationType": "derives"
|
|
848
809
|
},
|
|
@@ -876,12 +837,6 @@
|
|
|
876
837
|
"targetId": "need",
|
|
877
838
|
"relationType": "derives"
|
|
878
839
|
},
|
|
879
|
-
{
|
|
880
|
-
"id": "sc-slo--verifies--req-slo",
|
|
881
|
-
"sourceId": "sc-slo",
|
|
882
|
-
"targetId": "req-slo",
|
|
883
|
-
"relationType": "verifies"
|
|
884
|
-
},
|
|
885
840
|
{
|
|
886
841
|
"id": "sc-sli-request--verifies--req-sli-request",
|
|
887
842
|
"sourceId": "sc-sli-request",
|
|
@@ -913,21 +868,9 @@
|
|
|
913
868
|
"relationType": "verifies"
|
|
914
869
|
},
|
|
915
870
|
{
|
|
916
|
-
"id": "sc-
|
|
917
|
-
"sourceId": "sc-
|
|
918
|
-
"targetId": "req-
|
|
919
|
-
"relationType": "verifies"
|
|
920
|
-
},
|
|
921
|
-
{
|
|
922
|
-
"id": "sc-pii-redact--verifies--req-pii-redact",
|
|
923
|
-
"sourceId": "sc-pii-redact",
|
|
924
|
-
"targetId": "req-pii-redact",
|
|
925
|
-
"relationType": "verifies"
|
|
926
|
-
},
|
|
927
|
-
{
|
|
928
|
-
"id": "sc-pii-restricted--verifies--req-pii-restricted",
|
|
929
|
-
"sourceId": "sc-pii-restricted",
|
|
930
|
-
"targetId": "req-pii-restricted",
|
|
871
|
+
"id": "sc-retention--verifies--req-retention",
|
|
872
|
+
"sourceId": "sc-retention",
|
|
873
|
+
"targetId": "req-retention",
|
|
931
874
|
"relationType": "verifies"
|
|
932
875
|
},
|
|
933
876
|
{
|
|
@@ -961,14 +904,14 @@
|
|
|
961
904
|
"relationType": "verifies"
|
|
962
905
|
},
|
|
963
906
|
{
|
|
964
|
-
"id": "ff-
|
|
965
|
-
"sourceId": "ff-
|
|
907
|
+
"id": "ff-sli-request--implements--adr-otel",
|
|
908
|
+
"sourceId": "ff-sli-request",
|
|
966
909
|
"targetId": "adr-otel",
|
|
967
910
|
"relationType": "implements"
|
|
968
911
|
},
|
|
969
912
|
{
|
|
970
|
-
"id": "ff-
|
|
971
|
-
"sourceId": "ff-
|
|
913
|
+
"id": "ff-sli-request--implements--adr-logs",
|
|
914
|
+
"sourceId": "ff-sli-request",
|
|
972
915
|
"targetId": "adr-logs",
|
|
973
916
|
"relationType": "implements"
|
|
974
917
|
},
|
|
@@ -991,21 +934,15 @@
|
|
|
991
934
|
"relationType": "implements"
|
|
992
935
|
},
|
|
993
936
|
{
|
|
994
|
-
"id": "ff-
|
|
995
|
-
"sourceId": "ff-
|
|
996
|
-
"targetId": "adr-
|
|
997
|
-
"relationType": "implements"
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
"id": "ff-clean-logs--implements--adr-otel",
|
|
1001
|
-
"sourceId": "ff-clean-logs",
|
|
1002
|
-
"targetId": "adr-otel",
|
|
937
|
+
"id": "ff-escalation--implements--adr-oncall",
|
|
938
|
+
"sourceId": "ff-escalation",
|
|
939
|
+
"targetId": "adr-oncall",
|
|
1003
940
|
"relationType": "implements"
|
|
1004
941
|
},
|
|
1005
942
|
{
|
|
1006
|
-
"id": "ff-
|
|
1007
|
-
"sourceId": "ff-
|
|
1008
|
-
"targetId": "adr-
|
|
943
|
+
"id": "ff-hours-routing--implements--adr-hours",
|
|
944
|
+
"sourceId": "ff-hours-routing",
|
|
945
|
+
"targetId": "adr-hours",
|
|
1009
946
|
"relationType": "implements"
|
|
1010
947
|
},
|
|
1011
948
|
{
|
|
@@ -1026,12 +963,24 @@
|
|
|
1026
963
|
"targetId": "adr-otel",
|
|
1027
964
|
"relationType": "implements"
|
|
1028
965
|
},
|
|
966
|
+
{
|
|
967
|
+
"id": "ff-head-sampling--implements--adr-otel",
|
|
968
|
+
"sourceId": "ff-head-sampling",
|
|
969
|
+
"targetId": "adr-otel",
|
|
970
|
+
"relationType": "implements"
|
|
971
|
+
},
|
|
1029
972
|
{
|
|
1030
973
|
"id": "ff-tail-sampling--implements--adr-otel",
|
|
1031
974
|
"sourceId": "ff-tail-sampling",
|
|
1032
975
|
"targetId": "adr-otel",
|
|
1033
976
|
"relationType": "implements"
|
|
1034
977
|
},
|
|
978
|
+
{
|
|
979
|
+
"id": "ff-keep-all--implements--adr-otel",
|
|
980
|
+
"sourceId": "ff-keep-all",
|
|
981
|
+
"targetId": "adr-otel",
|
|
982
|
+
"relationType": "implements"
|
|
983
|
+
},
|
|
1035
984
|
{
|
|
1036
985
|
"id": "ff-health--implements--adr-otel",
|
|
1037
986
|
"sourceId": "ff-health",
|