adding filter for metrics
test-org/trust-module-backend/pipeline/pr-rc This commit looks good Details

pull/30/head
DmitriyA 2025-07-14 03:14:51 -04:00
parent 57cf65b9a6
commit 8a5d530d44
1 changed files with 10 additions and 7 deletions

View File

@ -225,10 +225,13 @@ export class PrometheusService {
async fetchAllMetricsWithValues(): Promise<any[]> { async fetchAllMetricsWithValues(): Promise<any[]> {
const metricNames = await this.fetchAllMetrics(); const metricNames = await this.fetchAllMetrics();
const promises = metricNames.map(async (metric) => { const zvksMetrics = metricNames.filter(metric => metric.startsWith('zvks'));
const promises = zvksMetrics.map(async (metric) => {
const data = await this.fetchMetrics(metric); const data = await this.fetchMetrics(metric);
return { metric, data }; return { metric, data };
}); });
return Promise.all(promises); return Promise.all(promises);
} }
} }