@pawells/nestjs-prometheus 1.1.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -201,8 +201,8 @@ The main NestJS module. Implements `OnModuleInit` and `OnApplicationShutdown`.
201
201
  Implements `IMetricsExporter` from `@pawells/nestjs-shared`.
202
202
 
203
203
  **Properties:**
204
- - `supportsEventBased` - `true` (buffers metric values)
205
- - `supportsPull` - `true` (supports pull-based retrieval)
204
+ - `SupportsEventBased` - `true` (buffers metric values)
205
+ - `SupportsPull` - `true` (supports pull-based retrieval)
206
206
 
207
207
  **Methods:**
208
208
  - `onDescriptorRegistered(descriptor: MetricDescriptor)` - Called when a metric is registered; creates the appropriate prom-client instrument
package/build/README.md CHANGED
@@ -201,8 +201,8 @@ The main NestJS module. Implements `OnModuleInit` and `OnApplicationShutdown`.
201
201
  Implements `IMetricsExporter` from `@pawells/nestjs-shared`.
202
202
 
203
203
  **Properties:**
204
- - `supportsEventBased` - `true` (buffers metric values)
205
- - `supportsPull` - `true` (supports pull-based retrieval)
204
+ - `SupportsEventBased` - `true` (buffers metric values)
205
+ - `SupportsPull` - `true` (supports pull-based retrieval)
206
206
 
207
207
  **Methods:**
208
208
  - `onDescriptorRegistered(descriptor: MetricDescriptor)` - Called when a metric is registered; creates the appropriate prom-client instrument
@@ -11,7 +11,7 @@ import { PrometheusExporter } from '../prometheus.exporter.js';
11
11
  *
12
12
  * Response Headers:
13
13
  * - `Content-Type: text/plain; version=0.0.4; charset=utf-8`
14
- * - `X-Robots-Tag: noindex, nofollow` — prevents search engine indexing
14
+ * - `X-Robots-ITag: noindex, nofollow` — prevents search engine indexing
15
15
  *
16
16
  * Security:
17
17
  * - Protected by MetricsGuard from @pawells/nestjs-shared
@@ -25,7 +25,7 @@ import { PrometheusExporter } from '../prometheus.exporter.js';
25
25
  * Response:
26
26
  * 200 OK
27
27
  * Content-Type: text/plain; version=0.0.4; charset=utf-8
28
- * X-Robots-Tag: noindex, nofollow
28
+ * X-Robots-ITag: noindex, nofollow
29
29
  *
30
30
  * # HELP http_request_duration_seconds Duration of HTTP requests in seconds
31
31
  * # TYPE http_request_duration_seconds histogram
@@ -34,7 +34,7 @@ import { PrometheusExporter } from '../prometheus.exporter.js';
34
34
  * ```
35
35
  */
36
36
  export declare class MetricsController {
37
- private readonly exporter;
37
+ private readonly Exporter;
38
38
  constructor(exporter: PrometheusExporter);
39
39
  /**
40
40
  * Get all metrics in Prometheus text format
@@ -55,7 +55,7 @@ export declare class MetricsController {
55
55
  *
56
56
  * Response Headers:
57
57
  * - Content-Type: text/plain; version=0.0.4; charset=utf-8
58
- * - X-Robots-Tag: noindex, nofollow
58
+ * - X-Robots-ITag: noindex, nofollow
59
59
  *
60
60
  * @param response - Express response object
61
61
  * @returns Promise that resolves when response is sent
@@ -67,7 +67,7 @@ export declare class MetricsController {
67
67
  *
68
68
  * HTTP/1.1 200 OK
69
69
  * Content-Type: text/plain; version=0.0.4; charset=utf-8
70
- * X-Robots-Tag: noindex, nofollow
70
+ * X-Robots-ITag: noindex, nofollow
71
71
  *
72
72
  * # HELP process_cpu_user_seconds_total Total user CPU time spent in seconds.
73
73
  * # TYPE process_cpu_user_seconds_total counter
@@ -79,6 +79,6 @@ export declare class MetricsController {
79
79
  * ...
80
80
  * ```
81
81
  */
82
- getMetrics(response: Response): Promise<void>;
82
+ GetMetrics(response: Response): Promise<void>;
83
83
  }
84
84
  //# sourceMappingURL=metrics.controller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metrics.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/metrics.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBACa,iBAAiB;IAE5B,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,kBAAkB;IAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IAKU,UAAU,CAAQ,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAIjE"}
1
+ {"version":3,"file":"metrics.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/metrics.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBACa,iBAAiB;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;gBAG7C,QAAQ,EAAE,kBAAkB;IAK7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IAKU,UAAU,CAAQ,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAIjE"}
@@ -24,7 +24,7 @@ import { PrometheusExporter } from '../prometheus.exporter.js';
24
24
  *
25
25
  * Response Headers:
26
26
  * - `Content-Type: text/plain; version=0.0.4; charset=utf-8`
27
- * - `X-Robots-Tag: noindex, nofollow` — prevents search engine indexing
27
+ * - `X-Robots-ITag: noindex, nofollow` — prevents search engine indexing
28
28
  *
29
29
  * Security:
30
30
  * - Protected by MetricsGuard from @pawells/nestjs-shared
@@ -38,7 +38,7 @@ import { PrometheusExporter } from '../prometheus.exporter.js';
38
38
  * Response:
39
39
  * 200 OK
40
40
  * Content-Type: text/plain; version=0.0.4; charset=utf-8
41
- * X-Robots-Tag: noindex, nofollow
41
+ * X-Robots-ITag: noindex, nofollow
42
42
  *
43
43
  * # HELP http_request_duration_seconds Duration of HTTP requests in seconds
44
44
  * # TYPE http_request_duration_seconds histogram
@@ -47,9 +47,9 @@ import { PrometheusExporter } from '../prometheus.exporter.js';
47
47
  * ```
48
48
  */
49
49
  let MetricsController = class MetricsController {
50
- exporter;
50
+ Exporter;
51
51
  constructor(exporter) {
52
- this.exporter = exporter;
52
+ this.Exporter = exporter;
53
53
  }
54
54
  /**
55
55
  * Get all metrics in Prometheus text format
@@ -70,7 +70,7 @@ let MetricsController = class MetricsController {
70
70
  *
71
71
  * Response Headers:
72
72
  * - Content-Type: text/plain; version=0.0.4; charset=utf-8
73
- * - X-Robots-Tag: noindex, nofollow
73
+ * - X-Robots-ITag: noindex, nofollow
74
74
  *
75
75
  * @param response - Express response object
76
76
  * @returns Promise that resolves when response is sent
@@ -82,7 +82,7 @@ let MetricsController = class MetricsController {
82
82
  *
83
83
  * HTTP/1.1 200 OK
84
84
  * Content-Type: text/plain; version=0.0.4; charset=utf-8
85
- * X-Robots-Tag: noindex, nofollow
85
+ * X-Robots-ITag: noindex, nofollow
86
86
  *
87
87
  * # HELP process_cpu_user_seconds_total Total user CPU time spent in seconds.
88
88
  * # TYPE process_cpu_user_seconds_total counter
@@ -94,21 +94,21 @@ let MetricsController = class MetricsController {
94
94
  * ...
95
95
  * ```
96
96
  */
97
- async getMetrics(response) {
98
- const metrics = await this.exporter.getMetrics();
99
- response.send(metrics);
97
+ async GetMetrics(response) {
98
+ const Metrics = await this.Exporter.GetMetrics();
99
+ response.send(Metrics);
100
100
  }
101
101
  };
102
102
  __decorate([
103
103
  Get('metrics'),
104
104
  UseGuards(MetricsGuard),
105
105
  Header('Content-Type', 'text/plain; version=0.0.4; charset=utf-8'),
106
- Header('X-Robots-Tag', 'noindex, nofollow'),
106
+ Header('X-Robots-ITag', 'noindex, nofollow'),
107
107
  __param(0, Res()),
108
108
  __metadata("design:type", Function),
109
109
  __metadata("design:paramtypes", [Object]),
110
110
  __metadata("design:returntype", Promise)
111
- ], MetricsController.prototype, "getMetrics", null);
111
+ ], MetricsController.prototype, "GetMetrics", null);
112
112
  MetricsController = __decorate([
113
113
  Controller(),
114
114
  __metadata("design:paramtypes", [PrometheusExporter])
@@ -1 +1 @@
1
- {"version":3,"file":"metrics.controller.js","sourceRoot":"","sources":["../../src/controllers/metrics.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAEX;IADlB,YACkB,QAA4B;QAA5B,aAAQ,GAAR,QAAQ,CAAoB;IAC3C,CAAC;IAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IAKU,AAAN,KAAK,CAAC,UAAU,CAAQ,QAAkB;QAChD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QACjD,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;CACD,CAAA;AAJa;IAJZ,GAAG,CAAC,SAAS,CAAC;IACd,SAAS,CAAC,YAAY,CAAC;IACvB,MAAM,CAAC,cAAc,EAAE,0CAA0C,CAAC;IAClE,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;IACnB,WAAA,GAAG,EAAE,CAAA;;;;mDAG7B;AAvDW,iBAAiB;IAD7B,UAAU,EAAE;qCAGgB,kBAAkB;GAFlC,iBAAiB,CAwD7B"}
1
+ {"version":3,"file":"metrics.controller.js","sourceRoot":"","sources":["../../src/controllers/metrics.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACZ,QAAQ,CAAqB;IAE9C,YACC,QAA4B;QAE5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IAKU,AAAN,KAAK,CAAC,UAAU,CAAQ,QAAkB;QAChD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QACjD,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;CACD,CAAA;AAJa;IAJZ,GAAG,CAAC,SAAS,CAAC;IACd,SAAS,CAAC,YAAY,CAAC;IACvB,MAAM,CAAC,cAAc,EAAE,0CAA0C,CAAC;IAClE,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC;IACpB,WAAA,GAAG,EAAE,CAAA;;;;mDAG7B;AA3DW,iBAAiB;IAD7B,UAAU,EAAE;qCAKD,kBAAkB;GAJjB,iBAAiB,CA4D7B"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pawells/nestjs-prometheus",
3
3
  "displayName": "@pawells/nestjs-prometheus",
4
- "version": "1.1.2",
4
+ "version": "2.0.1",
5
5
  "description": "NestJS Prometheus metrics module with endpoint controller",
6
6
  "type": "module",
7
7
  "main": "./build/index.js",
@@ -40,7 +40,7 @@
40
40
  "xss": ">=1.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "@pawells/nestjs-shared": "^1.1.0"
43
+ "@pawells/nestjs-shared": "2.0.1"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=22.0.0"
@@ -1,4 +1,4 @@
1
- import type { IMetricsExporter, MetricDescriptor, MetricValue } from '@pawells/nestjs-shared';
1
+ import type { IMetricsExporter, IMetricDescriptor, IMetricValue } from '@pawells/nestjs-shared';
2
2
  /**
3
3
  * Prometheus metrics exporter implementation
4
4
  *
@@ -33,34 +33,34 @@ export declare class PrometheusExporter implements IMetricsExporter {
33
33
  * This exporter buffers metric values as they are recorded and flushes
34
34
  * them into prom-client instruments on each pull (getMetrics)
35
35
  */
36
- readonly supportsEventBased = true;
36
+ readonly SupportsEventBased = true;
37
37
  /**
38
38
  * This exporter supports pull-based metric retrieval
39
39
  */
40
- readonly supportsPull = true;
40
+ readonly SupportsPull = true;
41
41
  /**
42
42
  * Prom-client Registry instance for managing instruments
43
43
  * @private
44
44
  */
45
- private readonly registry;
45
+ private readonly Registry;
46
46
  /**
47
47
  * Cache of created prom-client instruments (Counter, Histogram, Gauge)
48
48
  * Keyed by metric name
49
49
  * @private
50
50
  */
51
- private readonly instruments;
51
+ private readonly Instruments;
52
52
  /**
53
53
  * Pending metric values to be flushed into prom-client instruments on next getMetrics()
54
54
  * Keyed by metric name
55
55
  * @private
56
56
  */
57
- private readonly pending;
57
+ private readonly Pending;
58
58
  /**
59
59
  * Running totals for updown_counter metrics (persistent across scrapes)
60
60
  * Keyed by metric name, then by normalized label key
61
61
  * @private
62
62
  */
63
- private readonly gaugeValues;
63
+ private readonly GaugeValues;
64
64
  /**
65
65
  * Maximum number of pending metric values per metric before culling oldest entries
66
66
  * Prevents unbounded memory growth if metrics are recorded much faster than pulled
@@ -70,12 +70,12 @@ export declare class PrometheusExporter implements IMetricsExporter {
70
70
  /**
71
71
  * Logger instance for warnings and errors
72
72
  */
73
- private readonly logger;
73
+ private readonly Logger;
74
74
  /**
75
75
  * Normalize label keys to handle consistent ordering regardless of insertion order
76
76
  * @private
77
77
  */
78
- private static normalizeLabelKey;
78
+ private static NormalizeLabelKey;
79
79
  /**
80
80
  * Create a new PrometheusExporter instance
81
81
  *
@@ -109,7 +109,7 @@ export declare class PrometheusExporter implements IMetricsExporter {
109
109
  * });
110
110
  * ```
111
111
  */
112
- onDescriptorRegistered(descriptor: MetricDescriptor): void;
112
+ OnDescriptorRegistered(descriptor: IMetricDescriptor): void;
113
113
  /**
114
114
  * Buffer a metric value to be flushed on next getMetrics() call
115
115
  *
@@ -133,7 +133,7 @@ export declare class PrometheusExporter implements IMetricsExporter {
133
133
  * });
134
134
  * ```
135
135
  */
136
- onMetricRecorded(value: MetricValue): void;
136
+ OnMetricRecorded(value: IMetricValue): void;
137
137
  /**
138
138
  * Retrieve all metrics in Prometheus text format
139
139
  *
@@ -164,7 +164,7 @@ export declare class PrometheusExporter implements IMetricsExporter {
164
164
  * // http_request_duration_seconds_bucket{le="0.01",...} 5
165
165
  * ```
166
166
  */
167
- getMetrics(): Promise<string>;
167
+ GetMetrics(): Promise<string>;
168
168
  /**
169
169
  * Shutdown the exporter and clean up resources
170
170
  *
@@ -182,6 +182,6 @@ export declare class PrometheusExporter implements IMetricsExporter {
182
182
  * await exporter.shutdown();
183
183
  * ```
184
184
  */
185
- shutdown(): Promise<void>;
185
+ Shutdown(): Promise<void>;
186
186
  }
187
187
  //# sourceMappingURL=prometheus.exporter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prometheus.exporter.d.ts","sourceRoot":"","sources":["../src/prometheus.exporter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBACa,kBAAmB,YAAW,gBAAgB;IAC1D;;;OAGG;IACH,SAAgB,kBAAkB,QAAQ;IAE1C;;OAEG;IACH,SAAgB,YAAY,QAAQ;IAEpC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IAEpC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmE;IAE/F;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IAErD;;;;O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AAQ,CAAC,sBAAsB,CAAQ;IAEtD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IAEnC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAKhC;;;;;OAKG;;IAYH;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,sBAAsB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAgElE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAiBlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACU,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAqG1C;;;;;;;;;;;;;;;;OAgBG;IAEU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAMtC"}
@@ -46,34 +46,34 @@ let PrometheusExporter = class PrometheusExporter {
46
46
  * This exporter buffers metric values as they are recorded and flushes
47
47
  * them into prom-client instruments on each pull (getMetrics)
48
48
  */
49
- supportsEventBased = true;
49
+ SupportsEventBased = true;
50
50
  /**
51
51
  * This exporter supports pull-based metric retrieval
52
52
  */
53
- supportsPull = true;
53
+ SupportsPull = true;
54
54
  /**
55
55
  * Prom-client Registry instance for managing instruments
56
56
  * @private
57
57
  */
58
- registry;
58
+ Registry;
59
59
  /**
60
60
  * Cache of created prom-client instruments (Counter, Histogram, Gauge)
61
61
  * Keyed by metric name
62
62
  * @private
63
63
  */
64
- instruments;
64
+ Instruments;
65
65
  /**
66
66
  * Pending metric values to be flushed into prom-client instruments on next getMetrics()
67
67
  * Keyed by metric name
68
68
  * @private
69
69
  */
70
- pending;
70
+ Pending;
71
71
  /**
72
72
  * Running totals for updown_counter metrics (persistent across scrapes)
73
73
  * Keyed by metric name, then by normalized label key
74
74
  * @private
75
75
  */
76
- gaugeValues;
76
+ GaugeValues;
77
77
  /**
78
78
  * Maximum number of pending metric values per metric before culling oldest entries
79
79
  * Prevents unbounded memory growth if metrics are recorded much faster than pulled
@@ -84,14 +84,14 @@ let PrometheusExporter = class PrometheusExporter {
84
84
  /**
85
85
  * Logger instance for warnings and errors
86
86
  */
87
- logger;
87
+ Logger;
88
88
  /**
89
89
  * Normalize label keys to handle consistent ordering regardless of insertion order
90
90
  * @private
91
91
  */
92
- static normalizeLabelKey(labels) {
93
- const sortedEntries = Object.entries(labels).sort(([a], [b]) => a.localeCompare(b));
94
- return JSON.stringify(Object.fromEntries(sortedEntries));
92
+ static NormalizeLabelKey(labels) {
93
+ const SortedEntries = Object.entries(labels).sort(([a], [b]) => a.localeCompare(b));
94
+ return JSON.stringify(Object.fromEntries(SortedEntries));
95
95
  }
96
96
  /**
97
97
  * Create a new PrometheusExporter instance
@@ -100,13 +100,13 @@ let PrometheusExporter = class PrometheusExporter {
100
100
  * (process CPU, memory, event loop, garbage collection, etc.).
101
101
  */
102
102
  constructor() {
103
- this.registry = new Registry();
104
- this.instruments = new Map();
105
- this.pending = new Map();
106
- this.gaugeValues = new Map();
107
- this.logger = new AppLogger(undefined, PrometheusExporter_1.name);
103
+ this.Registry = new Registry();
104
+ this.Instruments = new Map();
105
+ this.Pending = new Map();
106
+ this.GaugeValues = new Map();
107
+ this.Logger = new AppLogger(undefined, PrometheusExporter_1.name);
108
108
  // Collect Node.js default metrics into our registry
109
- collectDefaultMetrics({ register: this.registry });
109
+ collectDefaultMetrics({ register: this.Registry });
110
110
  }
111
111
  /**
112
112
  * Called when a metric descriptor is registered in InstrumentationRegistry
@@ -134,59 +134,59 @@ let PrometheusExporter = class PrometheusExporter {
134
134
  * });
135
135
  * ```
136
136
  */
137
- onDescriptorRegistered(descriptor) {
137
+ OnDescriptorRegistered(descriptor) {
138
138
  const { name, type, help, labelNames, buckets } = descriptor;
139
139
  // Guard against duplicate registration
140
- if (this.instruments.has(name)) {
140
+ if (this.Instruments.has(name)) {
141
141
  return;
142
142
  }
143
143
  // Validate required fields
144
144
  if (!name) {
145
- this.logger.warn('Metric descriptor registered with empty name');
145
+ this.Logger.warn('Metric descriptor registered with empty name');
146
146
  return;
147
147
  }
148
148
  if (!help) {
149
- this.logger.warn(`Metric descriptor "${name}" registered with empty help text`);
149
+ this.Logger.warn(`Metric descriptor "${name}" registered with empty help text`);
150
150
  return;
151
151
  }
152
- let instrument;
152
+ let Instrument;
153
153
  switch (type) {
154
154
  case 'counter':
155
- instrument = new Counter({
155
+ Instrument = new Counter({
156
156
  name,
157
157
  help,
158
158
  labelNames,
159
- registers: [this.registry],
159
+ registers: [this.Registry],
160
160
  });
161
161
  break;
162
162
  case 'histogram':
163
- instrument = new Histogram({
163
+ Instrument = new Histogram({
164
164
  name,
165
165
  help,
166
166
  labelNames,
167
167
  buckets,
168
- registers: [this.registry],
168
+ registers: [this.Registry],
169
169
  });
170
170
  break;
171
171
  case 'gauge':
172
172
  case 'updown_counter':
173
173
  // Both gauge and updown_counter map to prom-client Gauge
174
- instrument = new Gauge({
174
+ Instrument = new Gauge({
175
175
  name,
176
176
  help,
177
177
  labelNames,
178
- registers: [this.registry],
178
+ registers: [this.Registry],
179
179
  });
180
180
  // Initialize running totals map for this metric
181
181
  if (type === 'updown_counter') {
182
- this.gaugeValues.set(name, new Map());
182
+ this.GaugeValues.set(name, new Map());
183
183
  }
184
184
  break;
185
185
  default:
186
186
  throw new Error(`Unsupported metric type "${type}" for descriptor "${name}"`);
187
187
  }
188
- this.instruments.set(name, instrument);
189
- this.pending.set(name, []);
188
+ this.Instruments.set(name, Instrument);
189
+ this.Pending.set(name, []);
190
190
  }
191
191
  /**
192
192
  * Buffer a metric value to be flushed on next getMetrics() call
@@ -211,19 +211,19 @@ let PrometheusExporter = class PrometheusExporter {
211
211
  * });
212
212
  * ```
213
213
  */
214
- onMetricRecorded(value) {
215
- const metricName = value.descriptor.name;
216
- const pendingArray = this.pending.get(metricName);
217
- if (pendingArray) {
218
- pendingArray.push(value);
214
+ OnMetricRecorded(value) {
215
+ const MetricName = value.descriptor.name;
216
+ const PendingArray = this.Pending.get(MetricName);
217
+ if (PendingArray) {
218
+ PendingArray.push(value);
219
219
  // Cap pending array to prevent unbounded memory growth
220
- if (pendingArray.length > PrometheusExporter_1.MAX_PENDING_PER_METRIC) {
221
- pendingArray.shift();
220
+ if (PendingArray.length > PrometheusExporter_1.MAX_PENDING_PER_METRIC) {
221
+ PendingArray.shift();
222
222
  }
223
223
  }
224
224
  else {
225
225
  // Warn if metric recorded before descriptor registration (data will be lost)
226
- this.logger.warn(`Metric recorded before descriptor registration: ${metricName}`);
226
+ this.Logger.warn(`Metric recorded before descriptor registration: ${MetricName}`);
227
227
  }
228
228
  }
229
229
  /**
@@ -256,94 +256,94 @@ let PrometheusExporter = class PrometheusExporter {
256
256
  * // http_request_duration_seconds_bucket{le="0.01",...} 5
257
257
  * ```
258
258
  */
259
- async getMetrics() {
259
+ async GetMetrics() {
260
260
  // Flush all pending values into prom-client instruments
261
261
  // Use atomic swap pattern: capture current values and replace with empty array
262
262
  // to prevent loss of metrics recorded concurrently during flush
263
- for (const [metricName, pendingValues] of this.pending.entries()) {
263
+ for (const [MetricName, PendingValues] of this.Pending.entries()) {
264
264
  // Atomically swap pending array with a fresh one
265
- this.pending.set(metricName, []);
266
- if (pendingValues.length === 0) {
265
+ this.Pending.set(MetricName, []);
266
+ if (PendingValues.length === 0) {
267
267
  continue;
268
268
  }
269
- const instrument = this.instruments.get(metricName);
270
- if (!instrument) {
269
+ const Instrument = this.Instruments.get(MetricName);
270
+ if (!Instrument) {
271
271
  // Instrument not yet created, skip pending values
272
272
  continue;
273
273
  }
274
274
  // Record all pending values into the appropriate instrument
275
- if (instrument instanceof Counter) {
275
+ if (Instrument instanceof Counter) {
276
276
  // Counter: increment by value for each pending entry
277
- for (const metricValue of pendingValues) {
277
+ for (const MetricValue of PendingValues) {
278
278
  try {
279
- instrument.inc(metricValue.labels, metricValue.value);
279
+ Instrument.inc(MetricValue.labels, MetricValue.value);
280
280
  }
281
281
  catch (recordError) {
282
- this.logger.warn(`Failed to record metric value for "${metricName}": ${getErrorMessage(recordError)}`);
282
+ this.Logger.warn(`Failed to record metric value for "${MetricName}": ${getErrorMessage(recordError)}`);
283
283
  }
284
284
  }
285
285
  }
286
- else if (instrument instanceof Histogram) {
286
+ else if (Instrument instanceof Histogram) {
287
287
  // Histogram: observe value for each pending entry
288
- for (const metricValue of pendingValues) {
288
+ for (const MetricValue of PendingValues) {
289
289
  try {
290
- instrument.observe(metricValue.labels, metricValue.value);
290
+ Instrument.observe(MetricValue.labels, MetricValue.value);
291
291
  }
292
292
  catch (recordError) {
293
- this.logger.warn(`Failed to record metric value for "${metricName}": ${getErrorMessage(recordError)}`);
293
+ this.Logger.warn(`Failed to record metric value for "${MetricName}": ${getErrorMessage(recordError)}`);
294
294
  }
295
295
  }
296
296
  }
297
- else if (instrument instanceof Gauge) {
297
+ else if (Instrument instanceof Gauge) {
298
298
  // Gauge: set values directly per label set
299
299
  // updown_counter: accumulate values per label set and maintain running total
300
- const accumulatedValues = new Map();
301
- for (const metricValue of pendingValues) {
302
- const labelKey = PrometheusExporter_1.normalizeLabelKey(metricValue.labels);
303
- const existing = accumulatedValues.get(labelKey);
304
- if (existing) {
305
- existing.value += metricValue.value;
300
+ const AccumulatedValues = new Map();
301
+ for (const MetricValue of PendingValues) {
302
+ const LabelKey = PrometheusExporter_1.NormalizeLabelKey(MetricValue.labels);
303
+ const Existing = AccumulatedValues.get(LabelKey);
304
+ if (Existing) {
305
+ Existing.value += MetricValue.value;
306
306
  }
307
307
  else {
308
- accumulatedValues.set(labelKey, {
309
- labels: metricValue.labels,
310
- value: metricValue.value,
308
+ AccumulatedValues.set(LabelKey, {
309
+ labels: MetricValue.labels,
310
+ value: MetricValue.value,
311
311
  });
312
312
  }
313
313
  }
314
314
  // Get running totals map for this metric (if it exists, it's an updown_counter)
315
- const runningTotals = this.gaugeValues.get(metricName);
315
+ const RunningTotals = this.GaugeValues.get(MetricName);
316
316
  // Apply accumulated values to the gauge (iterate only through unique label sets)
317
- for (const { labels, value: accumulatedValue } of accumulatedValues.values()) {
317
+ for (const { labels, value: AccumulatedValue } of AccumulatedValues.values()) {
318
318
  try {
319
- let finalValue = accumulatedValue;
319
+ let FinalValue = AccumulatedValue;
320
320
  // For updown_counters, add to running total; for regular gauges, use value directly
321
- if (runningTotals) {
322
- const normalizedKey = PrometheusExporter_1.normalizeLabelKey(labels);
323
- const currentTotal = runningTotals.get(normalizedKey) ?? 0;
324
- finalValue = currentTotal + accumulatedValue;
325
- runningTotals.set(normalizedKey, finalValue);
321
+ if (RunningTotals) {
322
+ const NormalizedKey = PrometheusExporter_1.NormalizeLabelKey(labels);
323
+ const CurrentTotal = RunningTotals.get(NormalizedKey) ?? 0;
324
+ FinalValue = CurrentTotal + AccumulatedValue;
325
+ RunningTotals.set(NormalizedKey, FinalValue);
326
326
  }
327
327
  // Convert number values to strings if needed for prom-client
328
- const labelsForProm = {};
329
- for (const [key, val] of Object.entries(labels)) {
330
- labelsForProm[key] = String(val);
328
+ const LabelsForProm = {};
329
+ for (const [Key, Val] of Object.entries(labels)) {
330
+ LabelsForProm[Key] = String(Val);
331
331
  }
332
- instrument.set(labelsForProm, finalValue);
332
+ Instrument.set(LabelsForProm, FinalValue);
333
333
  }
334
334
  catch (recordError) {
335
- this.logger.warn(`Failed to record metric value for "${metricName}": ${getErrorMessage(recordError)}`);
335
+ this.Logger.warn(`Failed to record metric value for "${MetricName}": ${getErrorMessage(recordError)}`);
336
336
  }
337
337
  }
338
338
  }
339
339
  }
340
340
  // Return metrics in Prometheus text format
341
341
  try {
342
- return await this.registry.metrics();
342
+ return await this.Registry.metrics();
343
343
  }
344
344
  catch (error) {
345
- const message = getErrorMessage(error);
346
- this.logger.error(`Failed to generate Prometheus metrics: ${message}`);
345
+ const Message = getErrorMessage(error);
346
+ this.Logger.error(`Failed to generate Prometheus metrics: ${Message}`);
347
347
  throw error;
348
348
  }
349
349
  }
@@ -365,11 +365,11 @@ let PrometheusExporter = class PrometheusExporter {
365
365
  * ```
366
366
  */
367
367
  // eslint-disable-next-line require-await
368
- async shutdown() {
369
- this.registry.clear();
370
- this.instruments.clear();
371
- this.pending.clear();
372
- this.gaugeValues.clear();
368
+ async Shutdown() {
369
+ this.Registry.clear();
370
+ this.Instruments.clear();
371
+ this.Pending.clear();
372
+ this.GaugeValues.clear();
373
373
  }
374
374
  };
375
375
  PrometheusExporter = PrometheusExporter_1 = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"prometheus.exporter.js","sourceRoot":"","sources":["../src/prometheus.exporter.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAG3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;;IAC9B;;;OAGG;IACa,kBAAkB,GAAG,IAAI,CAAC;IAE1C;;OAEG;IACa,YAAY,GAAG,IAAI,CAAC;IAEpC;;;OAGG;IACc,QAAQ,CAAW;IAEpC;;;;OAIG;IACc,WAAW,CAAmE;IAE/F;;;;OAIG;IACc,OAAO,CAA6B;IAErD;;;;OAIG;IACc,WAAW,CAAmC;IAE/D;;;;OAIG;IACH,4CAA4C;IACpC,MAAM,CAAU,sBAAsB,GAAG,IAAI,CAAC;IAEtD;;OAEG;IACc,MAAM,CAAY;IAEnC;;;OAGG;IACK,MAAM,CAAC,iBAAiB,CAAC,MAAuC;QACvE,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC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AC;QACzB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;;AA1WW,kBAAkB;IAD9B,UAAU,EAAE;;GACA,kBAAkB,CA2W9B"}
@@ -35,8 +35,8 @@ import { PrometheusExporter } from './prometheus.exporter.js';
35
35
  * ```
36
36
  */
37
37
  export declare class PrometheusModule implements OnModuleInit, OnApplicationShutdown {
38
- private readonly exporter;
39
- private readonly registry;
38
+ private readonly Exporter;
39
+ private readonly Registry;
40
40
  /**
41
41
  * Create a global PrometheusModule with automatic registration
42
42
  *
@@ -53,7 +53,7 @@ export declare class PrometheusModule implements OnModuleInit, OnApplicationShut
53
53
  * export class AppModule {}
54
54
  * ```
55
55
  */
56
- static forRoot(): DynamicModule;
56
+ static ForRoot(): DynamicModule;
57
57
  constructor(exporter: PrometheusExporter, registry: InstrumentationRegistry);
58
58
  /**
59
59
  * Initialize the module and register the Prometheus exporter
@@ -1 +1 @@
1
- {"version":3,"file":"prometheus.module.d.ts","sourceRoot":"","sources":["../src/prometheus.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,qBAAqB,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAMa,gBAAiB,YAAW,YAAY,EAAE,qBAAqB;IAwB1E,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAxB1B;;;;;;;;;;;;;;;OAeG;WACW,OAAO,IAAI,aAAa;gBAOpB,QAAQ,EAAE,kBAAkB,EAC5B,QAAQ,EAAE,uBAAuB;IAGnD;;;;;;;;;;;;;;OAcG;IACI,YAAY,IAAI,IAAI;IAI3B;;;;;;;;;;;;OAYG;IACU,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAGnD"}
1
+ {"version":3,"file":"prometheus.module.d.ts","sourceRoot":"","sources":["../src/prometheus.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,qBAAqB,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAMa,gBAAiB,YAAW,YAAY,EAAE,qBAAqB;IAC3E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IAEnD;;;;;;;;;;;;;;;OAeG;WACW,OAAO,IAAI,aAAa;gBAOrC,QAAQ,EAAE,kBAAkB,EAC5B,QAAQ,EAAE,uBAAuB;IAMlC;;;;;;;;;;;;;;OAcG;IACI,YAAY,IAAI,IAAI;IAI3B;;;;;;;;;;;;OAYG;IACU,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAGnD"}
@@ -46,8 +46,8 @@ import { MetricsController } from './controllers/metrics.controller.js';
46
46
  * ```
47
47
  */
48
48
  let PrometheusModule = PrometheusModule_1 = class PrometheusModule {
49
- exporter;
50
- registry;
49
+ Exporter;
50
+ Registry;
51
51
  /**
52
52
  * Create a global PrometheusModule with automatic registration
53
53
  *
@@ -64,14 +64,14 @@ let PrometheusModule = PrometheusModule_1 = class PrometheusModule {
64
64
  * export class AppModule {}
65
65
  * ```
66
66
  */
67
- static forRoot() {
67
+ static ForRoot() {
68
68
  return {
69
69
  module: PrometheusModule_1,
70
70
  };
71
71
  }
72
72
  constructor(exporter, registry) {
73
- this.exporter = exporter;
74
- this.registry = registry;
73
+ this.Exporter = exporter;
74
+ this.Registry = registry;
75
75
  }
76
76
  /**
77
77
  * Initialize the module and register the Prometheus exporter
@@ -89,7 +89,7 @@ let PrometheusModule = PrometheusModule_1 = class PrometheusModule {
89
89
  * ```
90
90
  */
91
91
  onModuleInit() {
92
- this.registry.registerExporter(this.exporter);
92
+ this.Registry.RegisterExporter(this.Exporter);
93
93
  }
94
94
  /**
95
95
  * Clean up resources on application shutdown
@@ -105,7 +105,7 @@ let PrometheusModule = PrometheusModule_1 = class PrometheusModule {
105
105
  * ```
106
106
  */
107
107
  async onApplicationShutdown() {
108
- await this.exporter.shutdown();
108
+ await this.Exporter.Shutdown();
109
109
  }
110
110
  };
111
111
  PrometheusModule = PrometheusModule_1 = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"prometheus.module.js","sourceRoot":"","sources":["../src/prometheus.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAA2D,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAOI,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAwBV;IACA;IAxBlB;;;;;;;;;;;;;;;OAeG;IACI,MAAM,CAAC,OAAO;QACpB,OAAO;YACN,MAAM,EAAE,kBAAgB;SACxB,CAAC;IACH,CAAC;IAED,YACkB,QAA4B,EAC5B,QAAiC;QADjC,aAAQ,GAAR,QAAQ,CAAoB;QAC5B,aAAQ,GAAR,QAAQ,CAAyB;IAChD,CAAC;IAEJ;;;;;;;;;;;;;;OAcG;IACI,YAAY;QAClB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED;;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ACjC,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;CACD,CAAA;AArEY,gBAAgB;IAN5B,MAAM,EAAE;IACR,MAAM,CAAC;QACP,SAAS,EAAE,CAAC,kBAAkB,CAAC;QAC/B,OAAO,EAAE,CAAC,kBAAkB,CAAC;QAC7B,WAAW,EAAE,CAAC,iBAAiB,CAAC;KAChC,CAAC;qCA4BU,kBAAkB;QAClB,uBAAuB;GA5BtB,gBAAgB,CAqE5B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pawells/nestjs-prometheus",
3
3
  "displayName": "@pawells/nestjs-prometheus",
4
- "version": "1.1.2",
4
+ "version": "2.0.1",
5
5
  "description": "NestJS Prometheus metrics module with endpoint controller",
6
6
  "type": "module",
7
7
  "main": "./build/index.js",
@@ -40,7 +40,7 @@
40
40
  "xss": ">=1.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "@pawells/nestjs-shared": "^1.1.0"
43
+ "@pawells/nestjs-shared": "2.0.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@nestjs/common": "^11.1.17",
@@ -52,9 +52,9 @@
52
52
  "class-validator": "^0.15.1",
53
53
  "compression": "^1.8.1",
54
54
  "csrf-csrf": "^4.0.3",
55
- "express": "^5.0.0",
55
+ "express": "^5.2.1",
56
56
  "helmet": "^8.1.0",
57
- "joi": "^18.0.0",
57
+ "joi": "^18.1.2",
58
58
  "prom-client": "^15.1.3",
59
59
  "reflect-metadata": "^0.2.2",
60
60
  "rxjs": "^7.8.2",