Skip to content

@promster/[email protected]

Compare
Choose a tag to compare
@tdeekens tdeekens released this 01 Sep 06:35
· 213 commits to main since this release
eeed04e

Major Changes

  • #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 and percentiles option. This is too restrictive in cases in which you need to customize metrics individually.

    As a result you can now pass metricBuckets and metricPercentiles as options. Both of which are a Record<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 or percentiles before you migrate the values into the structure above.

Minor Changes

  • #1096 3ce4835 Thanks @tdeekens! - Restructure TypeScript and improve types of skip-fn

    Previously the skip function received generics to pass the request and response type. These are not needed any more. The function exported from the respective package is now typed to it.

Patch Changes

  • #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'
  • #1098 dae8f75 Thanks @tdeekens! - Update dependencies

  • #1097 04f37e7 Thanks @tdeekens! - Update dependencies

  • Updated dependencies [dae8f75, c3fbd90, 04f37e7]: