Commit a237b2c
Add support for the comparison filters of Google Monitoring API (#2234)
* Add support for the comparison filters of Google Monitoring API
Google Monitoring API filters support <,<=,>,>= operators as described
in its documentation:
https://cloud.google.com/monitoring/api/v3/filters.
Current version of the library only has mappings of:
1. ’{key}_prefix:{value}' -> '{key} = starts_with("{value}")'
2. ’{key}_suffix:{value}' -> '{key} = ends_with("{value}")'
This patch introduces additional mappings of:
3. ’{key}_greater:{value}' -> '{key} > {value}'
4. ’{key}_greaterequal:{value}' -> '{key} >= {value}'
5. ’{key}_less:{value}' -> '{key} < {value}'
6. ’{key}_lessequal:{value}' -> '{key} <= {value}'
So that it is possible, for example, to filter based on the
response_code values range, as shown below:
metric.type = "appengine.googleapis.com/http/server/response_count"
AND metric.label.response_code < 600
AND metric.label.response_code >= 5001 parent efe359a commit a237b2c
2 files changed
+51
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
316 | 335 | | |
317 | 336 | | |
318 | 337 | | |
| |||
637 | 656 | | |
638 | 657 | | |
639 | 658 | | |
640 | | - | |
| 659 | + | |
| 660 | + | |
641 | 661 | | |
642 | 662 | | |
643 | 663 | | |
| |||
649 | 669 | | |
650 | 670 | | |
651 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
652 | 680 | | |
653 | 681 | | |
654 | 682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
560 | 582 | | |
561 | 583 | | |
562 | 584 | | |
| |||
0 commit comments