This repository has been archived by the owner on Aug 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
fix: allow multiple consumers of metrics #6
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To support using labels as disambiguators across multiple reporters of the same metric, cache metrics globally then return the pre-exsting metric when it's registered on subsequent occasions.
2 tasks
achingbrain
added a commit
to libp2p/js-libp2p-tcp
that referenced
this pull request
Nov 20, 2022
Instead of inserting the interface address into the metric name, use the metric address as a label prefix for the value being reported. This allows our metric names to be stable even if you don't know the ip/port combo that will be used ahead of time. The tradeoff is the label names may change between restarts if the port number changes, but we have to apply a disambguator somewhere. Depends on: - [ ] libp2p/js-libp2p-prometheus-metrics#6
achingbrain
added a commit
to libp2p/js-libp2p-tcp
that referenced
this pull request
Nov 20, 2022
Instead of inserting the interface address into the metric name, use the metric address as a label prefix for the value being reported. This allows our metric names to be stable even if you don't know the ip/port combo that will be used ahead of time. The tradeoff is the label names may change between restarts if the port number changes, but we have to apply a disambguator somewhere. Depends on: - [ ] libp2p/js-libp2p-prometheus-metrics#6
1 task
mpetrunic
approved these changes
Nov 21, 2022
…nsumers-of-metrics
github-actions bot
pushed a commit
that referenced
this pull request
Nov 21, 2022
## [1.1.1](v1.1.0...v1.1.1) (2022-11-21) ### Bug Fixes * allow multiple consumers of metrics ([#6](#6)) ([92bde9b](92bde9b))
🎉 This PR is included in version 1.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
mpetrunic
pushed a commit
to libp2p/js-libp2p-tcp
that referenced
this pull request
Nov 22, 2022
Instead of inserting the interface address into the metric name, use the metric address as a label prefix for the value being reported. This allows our metric names to be stable even if you don't know the ip/port combo that will be used ahead of time. The tradeoff is the label names may change between restarts if the port number changes, but we have to apply a disambguator somewhere. Depends on: - [ ] libp2p/js-libp2p-prometheus-metrics#6
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To support using labels as disambiguators across multiple reporters of the same metric, cache metrics globally then return the pre-exsting metric when it's registered on subsequent occasions.