Skip to content

Commit

Permalink
chore: reduce prom metric cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Sep 12, 2023
1 parent c6348f6 commit 68ba46c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event-stream/event-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,10 @@ function createMessageProcessorQueue(): EventMessageHandler {
const processorQueue = new PQueue({ concurrency: 1 });

const eventTimer = new prom.Histogram({
name: 'event_ingestion_timers',
name: 'stacks_event_ingestion_timers',
help: 'Event ingestion timers',
labelNames: ['event'],
buckets: prom.exponentialBuckets(1, 2, 22), // 22 buckets, from 1ms to 35minutes
buckets: prom.exponentialBuckets(50, 3, 10), // 10 buckets, from 50 ms to 15 minutes
});

const observeEvent = async (event: string, fn: () => Promise<void>) => {
Expand Down

0 comments on commit 68ba46c

Please sign in to comment.