Skip to content

Missing customMetrics from DecoratedFastify type #226

@danibix95

Description

@danibix95

Hi,

using custom-plugin-lib with Typescript I noticed that DecoratedFastify type is missing the optional field customMetrics containing all the custom metrics defined for a service.

Proposal

I would propose to add it, so that it is not necessary to extend the type to use custom metrics when they are enabled.
This could be achieved editing DecoratedFastify interface, adding the following field definition:

...
customMetrics?: Record<string, Metric<string>>
...

Your environment

node: v16
npm: 8.5.0

custom-plugin-lib: v4.3.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions