Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

feat: register metrics with custom registry #4

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

wemeetagain
Copy link
Member

Some applications (cough cough lodestar) use a custom registry to register metrics.
This allows for more graceful capture of metrics from multiple services within a single javascript runtime.

This PR adds the feature to pass in a custom registry to register all libp2p metrics with.

@achingbrain
Copy link
Member

Looks reasonable, but instead of adding an extra registry option to every metric type, how about extending the CalculatedMetricOptions interface to add a registry key?

@mpetrunic mpetrunic merged commit 5da2897 into libp2p:main Nov 21, 2022
@mpetrunic mpetrunic deleted the feat/custom-registry branch November 21, 2022 14:55
github-actions bot pushed a commit that referenced this pull request Nov 21, 2022
## [1.1.0](v1.0.1...v1.1.0) (2022-11-21)

### Features

* register metrics with custom registry ([#4](#4)) ([5da2897](5da2897))

### Trivial Changes

* Update .github/workflows/stale.yml [skip ci] ([351b00c](351b00c))
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants