Feature: Exposing Prometheus metrics to user-defined interface #6528
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.
Changes
--Metrics.ExposeHost
option and pass that to NethermindKestrelMetricServer so a hostname other than localhost can be exposed. Defaults to127.0.0.1
EDIT: to"+"
since this is the current default behavior without an option.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
I have only compiled this on my dev laptop and not run this on my production node yet. Therefore I am looking for early feedback to my commits until that can be completed. It would be good to verify the passed address matches what is printed in the logs (instead of 127.0.0.1, as it currently shows). as well as, ensuring that the hostname:port can be accessed, i.e. from dev laptop curl
If yes, did you write tests?
Notes on testing
Built Nethermind.Runner, correcting all errors and verified the new CLI option was available (when spelled correctly)
Documentation
Requires documentation update
Metrics documentation is already marked for needing update
Requires explanation in Release Notes
Add
Metrics.ExposeHost
configuration option. Defaults to127.0.0.1
. Allows Prometheus metrics to be exposed on an interface other than localhost.