mia-platform / mia-platform/custom-plugin-lib

Missing `customMetrics` from DecoratedFastify type

Open
#226 0 comments 3 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.