mia-platform / mia-platform/custom-plugin-lib
Missing `customMetrics` from DecoratedFastify type
@davidebianchi is already working on this.
Since May 12, 2022.
- Dominant language
- JavaScript
- Stars
- 25
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
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](https://github.com/mia-platform/custom-plugin-lib/blob/8265294bd1acf25a7446230de32dd3399280aa09/index.d.ts#L72) interface, adding the following field definition:
...
customMetrics?: Record>
...
### Your environment
node: v16
npm: 8.5.0
custom-plugin-lib: v4.3.2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.