You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike [@willsoto/nestjs-prometheus](https://github.com/willsoto/nestjs-prometheus), `nestjs-metrics-client` removes the need for cumbersome dependency injection, making your code cleaner and more portable.
43
+
Unlike [@willsoto/nestjs-prometheus](https://github.com/willsoto/nestjs-prometheus), `nestjs-metrics-client` removes the need for cumbersome dependency injection, making your code cleaner and more portable.
44
44
45
45
🌟 **Effortless Integration**
46
-
With minimal setup, you can start tracking metrics immediately. No need to configure a service in every file—just use the global `ReporterService`.
46
+
With minimal setup, you can start tracking metrics immediately. No need to configure a service in every file—just use the global `ReporterService`.
47
47
48
48
🎯 **Focus on Simplicity**
49
-
Designed for developers who want powerful metrics without the complexity of managing dependencies or boilerplate code.
49
+
Designed for developers who want powerful metrics without the complexity of managing dependencies or boilerplate code.
50
50
51
51
---
52
52
@@ -63,6 +63,7 @@ import { ReporterModule } from 'nestjs-metrics-client';
63
63
@Module({
64
64
imports: [
65
65
ReporterModule.forRoot({
66
+
// Default metrics are disabled by default, set to true to enable.
66
67
defaultMetricsEnabled: true,
67
68
defaultLabels: {
68
69
app: 'my-app',
@@ -86,7 +87,7 @@ async function bootstrap() {
86
87
const app =awaitNestFactory.create(AppModule);
87
88
88
89
// Initialize the global reporter
89
-
ReporterService.init(app.get(MetricsService));
90
+
ReporterService.init(app.get(MetricsService));
90
91
91
92
awaitapp.listen(3000);
92
93
}
@@ -126,7 +127,7 @@ The global static service for reporting metrics:
0 commit comments