- Updated dependencies [
7668337
]:- @promster/[email protected]
- @promster/[email protected]
-
#1175
2da8d99
Thanks @tdeekens! - Remove support for Node.js v18We didn't adjust functionality to remove support but changed the
engines
requirement.
-
Updated dependencies [
2da8d99
,0d8acff
]:- @promster/[email protected]
- @promster/[email protected]
- Updated dependencies [
6bc4617
]:- @promster/[email protected]
- @promster/[email protected]
- Updated dependencies [
660af55
,eab1f5c
]:- @promster/[email protected]
- @promster/[email protected]
-
#1099
c3fbd90
Thanks @tdeekens! - Allow customization of individual metrics.Previously we only allowed customizing a all histogram and percentile based metrics once with a
buckets
andpercentiles
option. This is too restrictive in cases in which you need to customize metrics individually.As a result you can now pass
metricBuckets
andmetricPercentiles
as options. Both of which are aRecord<string, number[]>
. The key needs to match a an existing metric type.This is a more elaborate example:
const middleware = createMiddleware({ app, options: { metricBuckets: { httpRequestContentLengthInBytes: [ 100000, 200000, 500000, 1000000, 1500000, 2000000, 3000000, 5000000, 10000000, ], httpRequestDurationInSeconds: [ 0.05, 0.1, 0.3, 0.5, 0.8, 1, 1.5, 2, 3, 10, ], }, metricPercentiles: { httpRequestDurationPerPercentileInSeconds: [0.5, 0.9, 0.95, 0.98, 0.99], httpResponseContentLengthInBytes: [ 100000, 200000, 500000, 1000000, 1500000, 2000000, 3000000, 5000000, 10000000, ], }, }, });
If you used
buckets
orpercentiles
before you migrate the values into the structure above.
-
#1096
3ce4835
Thanks @tdeekens! - Restructure TypeScript and improve types ofskip
-fnPreviously the
skip
function received generics to pass therequest
andresponse
type. These are not needed any more. The function exported from the respective package is now typed to it. -
#1103
0476e91
Thanks @tdeekens! - Add support for generics to skip function.The
skip
function now supports generics for cases in which you have extended the request and response type in your application. The generics default to each framework's request and response type. If you need to overwrite this pass the generics as inskip<MyRequestType, MyResponseType>(request, response)
.
-
#1093
ec70682
Thanks @tdeekens! - Re-export types from each package.This is a convenience re-export where prior you had to use the
@promster/types
package as a standalone import you can now use the package you're using.-import { TPromsterOptions } from '@promster/types' +import { TPromsterOptions } from '@promster/express'
-
Updated dependencies [
ec70682
,dae8f75
,c3fbd90
,3ce4835
,04f37e7
]:- @promster/[email protected]
- @promster/[email protected]
-
#1088
7cfd21c
Thanks @tdeekens! - Breaking droping support for Node.js v14 -
#1087
2e848c1
Thanks @roumigus! - Theup
metric of each server integrating@promster
has been renamed tonodejs_up
. This is to avoid a collision with the existingup
metric Prometheus uses.You can still rename this metric to anything you prefer when condfigurating
@promster/express
for instance like this:const prometheusMetricsMiddleware = createPrometheusMetricsMiddleware({ options: { metricNames: { up: ["service_name_up"], }, }, });
-
Updated dependencies [
31b82fd
,7cfd21c
,2e848c1
]:- @promster/[email protected]
-
Updated dependencies [
58ffa97
,8df4fe6
]:- @promster/[email protected]
-
Updated dependencies [
5d4842e
]:- @promster/[email protected]
-
#865
abc0df1
Thanks @tdeekens! - Fix timing to not truncate fractional numbers. -
Updated dependencies [
abc0df1
]:- @promster/[email protected]
-
Updated dependencies [
defcae7
,0e033fa
]:- @promster/[email protected]
-
#794
06cf42b
Thanks @tdeekens! - Fix package names fromyarn@3
migration -
Updated dependencies [
06cf42b
]:- @promster/[email protected]
-
#791
7f44d2e
Thanks @tdeekens! - Refactor to useprocess.hrtime.bigint()
overprocess.hrtime()
.The Node.js documentation lists
process.hrtime([time])
as a legacy feature. It is no longer recommended for use, and should be avoided. As such it is recommended to useprocess.hrtime.bigint()
which works slightly different.This change is backwards compatible. A new
timing
module was added to@promster/metrics
which encapsulates timings so you never have to worry about the details.import { getRequestRecorder } = require('@promster/express'); +import { timing } = require('@promster/express'); +const requestTiming = timing.start(); -const requestTiming = process.hrtime(); recordRequest(requestTiming);
We recommend to change all explicit calls to
process.hrtime()
with calls totiming.start()
over time. TherecordRequest
function will continue to accept a[number, number]
as the return ofprocess.hrtime()
so you can change code as you work with it. -
Updated dependencies [
7f44d2e
]:- @promster/[email protected]
-
#778
e5658c7
Thanks @tdeekens! - This major change removes the support for theaccurancies
option. Historically,promster
first supported milliseconds. Then learning that seconds is the default time interval in the Prometheus community. Theaccuracies
option was added to enable a soft migration from milliseconds to seconds not to always support both time intervals.In case you haven't migrated your metrics to seconds and don't want to loose data we recommend to have the same metric with two names using the
metricNames
option ending in*_seconds
and*_milliseconds
. This way you only need to change the time interval in e.g. Grafana when hitting the time when the library was updated. Then migrate all dashboards and recording rules and eventually remove the*_milliseconds
metricName
option again.If you would like to read more about the reasoning of this decision head here.
- #771
dfc14a3
Thanks @tdeekens! - Allow passing adisableGcMetrics
boolean option to disable Garbage Collection metrics.
- #785
c619be8
Thanks @tdeekens! - Refactor all tests to integration tests setting up two servers. One for metric exposure and the other to trigger metrics.
- #772
402c8c0
Thanks @tdeekens! - Refactor to split metric types intogcMetrics
andhttpMetrics
to empower future metric types.
- #778
e5658c7
Thanks @tdeekens! - Fixes that not always a{ req, res }
object was passed to all normalizers in all plugins by making the typing more explicit.
-
Updated dependencies [
d49c30f
,402c8c0
,e5658c7
,e5658c7
,1b84464
,548c56e
,5e67884
,dfc14a3
,9d6a2ee
]:- @promster/[email protected]
-
#758
f02e6fe
Thanks @tdeekens! - We droped support for Node.js< 14
via theengines
field of the respectivepackage.json
files.We didn't make any changes to our code to prevent e.g. Node.js v9 to work but will not claim to officially support it any longer.
-
Updated dependencies [
f02e6fe
,7e7a1c6
,92cdf28
,92cdf28
]:- @promster/[email protected]
-
#755
84435d4
Thanks @tdeekens! - Update dependencies and release all packages -
Updated dependencies [
84435d4
]:- @promster/[email protected]
-
a24f38f
Thanks @tdeekens! - Update all dependencies including gc-stats -
Updated dependencies [
a24f38f
]:- @promster/[email protected]
-
cbc12c7
Thanks @tdeekens! - Update dependencies and added spell check as a GitHub Action -
Updated dependencies [
cbc12c7
]:- @promster/[email protected]
- #705
e2a1595
Thanks @tdeekens! - Add content length metric for both requests and responses. Both are recorded as Prometheus histograms under the namehttp_request_content_length_bytes
andhttp_response_content_length_bytes
.
- Updated dependencies [
e351e91
,e2a1595
,e351e91
]:- @promster/[email protected]
-
Updated dependencies [
ec2a8f8
,bbab9ca
]:- @promster/[email protected]
-
#601
17a24dc
Thanks @tdeekens! - Update dependencies and apply eslint rule suggestions. -
Updated dependencies [
17a24dc
]:- @promster/[email protected]
-
39dbcfa
#553 Thanks @renovate! - chore(deps): update dependency @hapi/boom to v9.1.1 -
Updated dependencies [
daf8605
]:- @promster/[email protected]
-
0eb64ca
#529 Thanks @tdeekens! - # Introductionrefactor: to use preconstruct for building
Prior TypeScript was used to build bundles. In all this should not affect consumers of this library. Under the hood preconstruct uses rollup and babel which is now instructed to build for Node.js v12 using the preset-env preset.
This release can potentially be breaking for you. We want to respect semantic versioning and follow it strictly.
While migrating to preconstruct the
version
exports had to be removed as preconstruct's rollup will not resolve them. If you relied on this value you should either load thepackage.json
of each module yourself or drop the usage.- const { version } = require('@promster/server'); + const { version } = require('@promster/server/package.json');
-
Updated dependencies [
bdf75de
,0eb64ca
]:- @promster/[email protected]
-
Updated dependencies [
4c3af06
]:- @promster/[email protected]
-
56fe635
#473 Thanks @tdeekens! - breaking(hapi): to bump required node to v12The
@promster/hapi
package now requires at least Node.js v12. This is rooted in the@hapi/hapi
package being used which were introduced in 18.2.0.
-
158e7b9
Thanks @tdeekens! - Dependency updates across all packages -
Updated dependencies [
158e7b9
]:- @promster/[email protected]
-
Updated dependencies [
7853faa
]:- @promster/[email protected]