All notable changes to this project will be documented in this file.
-
Replace decorators
@InjectCounterMetric()
->@PromCounter()
@InjectGaugeMetric()
->@PromGauge()
@InjectHistogramMetric()
->@PromHistogram()
@InjectSummaryMetric()
->@PromSummary()
-
Remove
PromModule.forMetrics()
no need anymore -
Option removed:
useHttpCounterMiddleware
withGlobalInterceptor
-
Remove
Interceptor
replaced by middlewarehttp_requests_total
replaced byhttp_requests_count
-
Option marked as deprecated:
customUrl
is replaced bymetricPath
-
Add
withHttpMiddleware
options -
Rewrite internally how to manage
-
Adding Gauge test (PR 42 - thanks @dlukanin)
-
Add request duration on middleware (PR 36 - thanks @litichevskiydv)
BREAKING CHANGE: With prom-client v12, the Metric classes is now a generic class, check the prom-client documentation for more info
- update prom-client to v12 - (thanks @AeroNotix)
- fix counter generic type - (thanks @ZamNick)
- fix typo changelog - (thanks @jakubknejzlik)
- Small fix for fastify engine compatibility - (thanks @blackkopcap)
- Add posibility to configure custom url for metric - (thanks @bashleigh)
Bump 0.2.0 target nestjs v6
- Upgrade nestjs package to v6 - (thanks @FSM1)
Bump 0.1.0 target nestjs v5
- Add new decorators
- @PromMethodCounter
- This decorator will auto create a counter and increment everytime when the method is called
- The counter name format is:
app_{className}_{methodName}_calls_total
- @PromInstanceCounter
- This decorator will auto create a counter and increment everytime when an instance of a class is created
- The counter name format is:
app_{className}_instances_total
- @PromMethodCounter
- Update packages-lock due of audit
- In middleware, call next() if path is not under monitoring
http_requests_total
only count the number of requests received
- new options
PromModule.forRoot
withDefaultsMetrics: boolean (default true)
enable defaultMetrics provided by prom-clientwithDefaultController: boolean (default true)
add internal controller to expose /metrics endpointsuseHttpCounterMiddleware: boolean (default false)
register http_requests_total counter
- Provide
http_requests_total
counter ifuseHttpCounterMiddleware
enabled- ignore
/metrics
- ignore
/favicon.ico
- ignore
- Provide default counter with
/metrics
endpoint ifwithDefaultController
enabled - Example folder
- Initial version
- Setup Changelog
- Setup README
- Adding metrics type
- Counter
- Gauge
- Histogram
- Summary