You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
436 B
15 lines
436 B
import { Controller, Get, Res } from '@nestjs/common';
|
|
import * as client from 'prom-client';
|
|
import { ApiExcludeEndpoint } from '@nestjs/swagger';
|
|
import { Public } from '../../../decorators/public.decorator';
|
|
|
|
@Controller('metrics')
|
|
export class PromController {
|
|
@Public()
|
|
@ApiExcludeEndpoint()
|
|
@Get()
|
|
index(@Res() res) {
|
|
res.set('Content-Type', client.register.contentType);
|
|
res.end(client.register.metrics());
|
|
}
|
|
}
|