Add dinosaur wet metrics

This commit is contained in:
2023-10-16 17:52:02 -06:00
parent deb257b2fe
commit 295b217539
6 changed files with 108 additions and 38 deletions

View File

@@ -1,7 +1,29 @@
import { Module } from '@nestjs/common';
import { DinosaurwetController } from './dinosaurwet.controller';
import {
PrometheusModule,
makeGaugeProvider,
} from '@willsoto/nestjs-prometheus';
@Module({
controllers: [DinosaurwetController]
imports: [
PrometheusModule.register({
customMetricPrefix: 'dinosaurwet',
defaultMetrics: {
enabled: false,
},
}),
],
controllers: [DinosaurwetController],
providers: [
makeGaugeProvider({
name: 'daily_count',
help: 'The current daily Dinosaur Wet episode count',
}),
makeGaugeProvider({
name: 'weekly_count',
help: 'The current weekly Dinosaur Wet episode count',
}),
],
})
export class DinosaurwetModule {}