-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new flag + readme for starting p2p prometheus dashboards #5707
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## rc/v1.7.0 #5707 +/- ##
=============================================
- Coverage 80.32% 80.31% -0.01%
=============================================
Files 709 709
Lines 93901 93914 +13
=============================================
+ Hits 75425 75431 +6
- Misses 13185 13191 +6
- Partials 5291 5292 +1 ☔ View full report in Codecov by Sentry. |
facade/nodeFacade.go
Outdated
@@ -36,7 +36,8 @@ import ( | |||
const DefaultRestInterface = "localhost:8080" | |||
|
|||
// DefaultRestPortOff is the default value that should be passed if it is desired | |||
// to start the node without a REST endpoint available | |||
// | |||
// to start the node without a REST endpoint available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong formatting
facade/nodeFacade.go
Outdated
@@ -163,7 +164,8 @@ func (nf *nodeFacade) RestAPIServerDebugMode() bool { | |||
|
|||
// RestApiInterface returns the interface on which the rest API should start on, based on the config file provided. | |||
// The API will start on the DefaultRestInterface value unless a correct value is passed or | |||
// the value is explicitly set to off, in which case it will not start at all | |||
// | |||
// the value is explicitly set to off, in which case it will not start at all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong formatting
@@ -17,14 +17,14 @@ func TestInitialNodeFacade(t *testing.T) { | |||
t.Run("nil status metrics should error", func(t *testing.T) { | |||
t.Parallel() | |||
|
|||
inf, err := NewInitialNodeFacade("127.0.0.1:8080", true, nil) | |||
inf, err := NewInitialNodeFacade("127.0.0.1:8080", true, false, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe move all arguments for the NewInitialNodeFacade into a single arg-struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
started testing the readme...
README.md
Outdated
1. Start the node with `--p2p-prometheus-metrics` flag. This exposes a metrics collection at http://localhost:5001/debug/metrics/prometheus. | ||
2. Clone libp2p repository: `git clone https://github.com/libp2p/go-libp2p` | ||
3. `cd go-libp2p/dasboards/swarm` and under the | ||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might remove the json
tag because the code is not json compatible (missing ], }
at the end)
Valid for L95. This will improve the readability in github
@@ -73,6 +73,7 @@ GLOBAL OPTIONS: | |||
--logs-path directory This flag specifies the directory where the node will store logs. | |||
--operation-mode operation mode String flag for specifying the desired operation mode(s) of the node, resulting in altering some configuration values accordingly. Possible values are: snapshotless-observer, full-archive, db-lookup-extension, historical-balances or `""` (empty). Multiple values can be separated via , | |||
--repopulate-tokens-supplies Boolean flag for repopulating the tokens supplies database. It will delete the current data, iterate over the entire trie and add he new obtained supplies | |||
--p2p-prometheus-metrics Boolean option for enabling the /debug/metrics/prometheus route for p2p prometheus metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md
Outdated
@@ -83,6 +83,36 @@ sudo cp protoc-gen-gogoslick /usr/bin/ | |||
|
|||
Done | |||
|
|||
## Running p2p Prometheus dashboards | |||
1. Start the node with `--p2p-prometheus-metrics` flag. This exposes a metrics collection at http://localhost:5001/debug/metrics/prometheus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the port is not 5001
, is the one defined by the -rest-api-interface
flag which defaults to localhost:8080
README.md
Outdated
``` | ||
sudo docker compose -f docker-compose.base.yml -f docker-compose-linux.yml up --force-recreate | ||
``` | ||
**Note:** this command is not compatible with compose v1, thus an update to v2 would be needed. More details about the migration [here](https://docs.docker.com/compose/migrate/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add here: if you choose to install the new Docker version manually, please make sure that installation is done for all users of the system. Otherwise, the docker command will fail because it needs the super-user privileges.
... or something like this :)
Reasoning behind the pull request
Proposed changes
/debug/metrics/prometheus
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?