Commit 54b29df
Add regex pattern support for breakout filters
Implemented regex pattern matching in breakout filters with two modes:
- r/pattern/ (lowercase): Returns separate metrics for each matching value
- R/pattern/ (uppercase): Returns single aggregated metric for all matches
Features:
- Custom delimiter support: use any character after r/R as delimiter
(e.g., r/pattern/, r|pattern|, r#pattern#)
- Consistent syntax with literal values (r vs R parallels , vs +)
- OpenSearch regexp query integration for efficient pattern matching
Examples:
- --breakout hostname=r/^worker-.*/ (separate metrics per worker)
- --breakout hostname=R/^client-.*/ (aggregated metric for all clients)
- --breakout dev=r|/dev/sd.*| (custom delimiter for patterns with /)
Implementation:
- Modified getBreakoutAggregation() to exclude fields with R/pattern/
- Updated getMetricGroupsFromBreakouts() to detect and apply regexp filters
- Added comprehensive documentation with examples and use cases
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent c879aea commit 54b29df
2 files changed
Lines changed: 103 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
409 | 453 | | |
410 | 454 | | |
411 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2425 | 2425 | | |
2426 | 2426 | | |
2427 | 2427 | | |
| 2428 | + | |
| 2429 | + | |
2428 | 2430 | | |
2429 | 2431 | | |
2430 | | - | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
2431 | 2458 | | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
2442 | | - | |
2443 | 2459 | | |
2444 | 2460 | | |
2445 | 2461 | | |
| |||
2610 | 2626 | | |
2611 | 2627 | | |
2612 | 2628 | | |
2613 | | - | |
| 2629 | + | |
2614 | 2630 | | |
2615 | 2631 | | |
2616 | 2632 | | |
2617 | 2633 | | |
2618 | 2634 | | |
2619 | 2635 | | |
2620 | | - | |
2621 | | - | |
2622 | | - | |
2623 | | - | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
2624 | 2653 | | |
2625 | | - | |
| 2654 | + | |
2626 | 2655 | | |
2627 | 2656 | | |
2628 | | - | |
2629 | | - | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
2630 | 2669 | | |
2631 | 2670 | | |
2632 | 2671 | | |
| |||
0 commit comments