Coding task · NestJS course · Module 6: Error Handling and Monitoring

/metrics Endpoint for Prometheus

Create a GET /metrics endpoint that returns metrics in Prometheus format

Task

Complete the MetricsController with @Get('/metrics') that sets Content-Type to 'text/plain' and returns register.metrics() from prom-client