()
| 698 | prom_addr = export_addr or build_address(addr, metrics_export_port) |
| 699 | |
| 700 | def f(): |
| 701 | for metric_pattern in metrics_to_check: |
| 702 | metric_samples = fetch_prometheus_timeseries( |
| 703 | [prom_addr], timeseries |
| 704 | ).metric_samples.values() |
| 705 | for metric_sample in metric_samples: |
| 706 | if metric_pattern.matches(metric_sample): |
| 707 | break |
| 708 | else: |
| 709 | logger.info( |
| 710 | f"Didn't find {metric_pattern} in all samples: {metric_samples}", |
| 711 | ) |
| 712 | return False |
| 713 | return True |
| 714 | |
| 715 | return f |
| 716 |
nothing calls this directly
no test coverage detected