Skip to content

Commit a8b775f

Browse files
authored
adjust buckets (#6750)
1 parent 296f2fa commit a8b775f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/services/schema/src/metrics.ts

+6
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,29 @@ export const schemaCompositionCounter = new metrics.Counter({
1212
labelNames: ['cache' /* hit or miss */, 'type' /* success, failure or timeout */],
1313
});
1414

15+
const msBuckets = [50, 300, 2_000, 5_000, 10_000];
16+
1517
export const compositionTotalDurationMS = new metrics.Histogram({
1618
name: 'composition_total_duration_ms',
1719
help: 'Total time of processing a composition (includes time in queue + actual processing time)',
20+
buckets: msBuckets,
1821
});
1922

2023
export const compositionQueueDurationMS = new metrics.Histogram({
2124
name: 'composition_queue_duration_ms',
2225
help: 'Time spent in queue before being processed.',
26+
buckets: msBuckets,
2327
});
2428

2529
export const compositionWorkerDurationMS = new metrics.Histogram({
2630
name: 'composition_worker_duration_ms',
2731
help: 'Time of running composition in worker',
2832
labelNames: ['type' /* single, federation or stitching */],
33+
buckets: msBuckets,
2934
});
3035

3136
export const compositionCacheValueSizeBytes = new metrics.Histogram({
3237
name: 'composition_cache_value_size_bytes',
3338
help: 'The size of the cache entries.',
39+
buckets: [200, 500, 1_000, 2_000, 3_000, 4_000, 5_000, 7_000, 10_000, 15_000, 20_000, 30_000],
3440
});

0 commit comments

Comments
 (0)