Commit 23ad8e3
authored
feat(lading): add record policy to allowlist recorded series in datadog blackhole (#1911)
* feat(datadog blackhole): add record policy to filter capture tags
The Datadog intake blackhole re-emits every received series into lading's
capture system, preserving all payload tags. A target that stamps an
unbounded tag (e.g. a per-event host) produces one capture series per unique
tag-set, inflating the capture file without bound and OOM-ing downstream
analysis.
Add an optional `record` policy on the datadog blackhole config:
- `all` (default): unchanged behaviour, record every series with every tag.
- `disabled`: record no series; still decode payloads and count bytes.
- `tags: { keep: [...] }`: record series but retain only the allowlisted tag
keys, bounding capture-series cardinality by construction.
Defaults to `all`, so existing configs are unaffected.
* refactor(datadog blackhole): make tag filter a denylist
Flip the `tags` record variant from an allowlist (`keep`) to a denylist
(`drop`): record every tag except the listed keys. This matches the common
case of stripping a single known high-cardinality tag (e.g. `host`) while
keeping the rest of the series intact.
An empty `drop` set is a no-op, equivalent to `all`.
* refactor(datadog blackhole): use TagsToDrop newtype variant
Replace the `Tags { drop }` struct variant with a self-describing
`TagsToDrop(BTreeSet<String>)` newtype, giving a flat `tags_to_drop: [...]`
config. Note in the docs that an empty list behaves like `all`, only slower.
* refactor(datadog blackhole): simplify record policy plumbing
Drop the custom deserialize_record fn in favour of
`with = "singleton_map_recursive"`, hoist the disabled check out of the
recording loop, and remove a redundant `#[inline]`.
* chore(datadog blackhole): trim added tests and changelog wording
* refactor(datadog blackhole): allowlist recorded series by metric name
Replace the tag denylist with an allowlist keyed by series (metric) name:
`series_to_keep: [...]` records only the named series, with all their tags.
This keeps the lading config's recorded outputs explicit and avoids
accidentally forwarding generator/fuzz series to org2.1 parent 8999bd7 commit 23ad8e3
2 files changed
Lines changed: 113 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
95 | 132 | | |
96 | 133 | | |
97 | 134 | | |
98 | 135 | | |
99 | 136 | | |
100 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
101 | 142 | | |
102 | 143 | | |
103 | 144 | | |
| |||
106 | 147 | | |
107 | 148 | | |
108 | 149 | | |
| 150 | + | |
109 | 151 | | |
110 | 152 | | |
111 | 153 | | |
112 | 154 | | |
113 | 155 | | |
| 156 | + | |
114 | 157 | | |
115 | 158 | | |
116 | 159 | | |
| |||
133 | 176 | | |
134 | 177 | | |
135 | 178 | | |
| 179 | + | |
136 | 180 | | |
137 | 181 | | |
138 | 182 | | |
| |||
146 | 190 | | |
147 | 191 | | |
148 | 192 | | |
149 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
150 | 197 | | |
151 | 198 | | |
152 | 199 | | |
| |||
241 | 288 | | |
242 | 289 | | |
243 | 290 | | |
244 | | - | |
| 291 | + | |
245 | 292 | | |
246 | 293 | | |
247 | 294 | | |
| |||
299 | 346 | | |
300 | 347 | | |
301 | 348 | | |
| 349 | + | |
302 | 350 | | |
303 | 351 | | |
304 | 352 | | |
| |||
318 | 366 | | |
319 | 367 | | |
320 | 368 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
362 | 399 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
374 | 429 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | 430 | | |
383 | 431 | | |
384 | 432 | | |
| |||
0 commit comments