-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: setup devenv observability #1105
base: main
Are you sure you want to change the base?
Conversation
and prometheus config files
docker/docker-compose.yml
Outdated
- observability | ||
|
||
grafana: | ||
image: grafana/grafana:10.2.3-ubuntu |
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.
nit: 11.4.0
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 in 28a0436.
docker/docker-compose.yml
Outdated
@@ -610,3 +614,54 @@ services: | |||
command: "./wait-for-it.sh mariadb:3306 --timeout=720 --strict -- ./start.sh" | |||
profiles: | |||
- bitcoin-mempool | |||
|
|||
prometheus: | |||
image: prom/prometheus:v2.45.2 |
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.
nit: v3.0.1
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 in 28a0436.
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.
This is nice! 👏
docker/vector.toml
Outdated
type = "prometheus_scrape" | ||
endpoints = [ | ||
"http://host.docker.internal:9181", | ||
"http://host.docker.internal:9182", | ||
"http://host.docker.internal:9183", | ||
] | ||
|
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.
Oh! I didn't knew we could do this with vector! So we can use the same stack to push signer metrics (if they allow us to!)
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.
Yup, it's a great tool.
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.
I tried this locally but I couldn't find any metric/dashboard on the grafana instance.
@@ -67,7 +67,7 @@ exec_run() { | |||
. "$ENV_PATH/signer-$i.env" \ | |||
&& export RUST_LOG="$LOG_SETTINGS" \ | |||
&& export SIGNER_SIGNER__BOOTSTRAP_SIGNING_SET="$BOOTSTRAP_SIGNER_SET" \ | |||
&& cargo run --bin signer -- --config "$SIGNER_CONFIG" --migrate-db > "$PWD/target/signer-$i.log" 2>&1 \ | |||
&& cargo run --bin signer -- --config "$SIGNER_CONFIG" --migrate-db -o json > "$PWD/target/signer-$i.log" 2>&1 \ |
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.
Can we add a flag to control the -o json
? Otherwise checking the logs when running this natively will be quite annoying.
@@ -30,6 +30,10 @@ x-common-vars: | |||
- &REWARD_RECIPIENT ${REWARD_RECIPIENT:-STQM73RQC4EX0A07KWG1J5ECZJYBZS4SJ4ERC6WN} # priv: 6ad9cadb42d4edbfbe0c5bfb3b8a4125ddced021c4174f829b714ccbf527f02001 | |||
- &EXIT_FROM_MONITOR 1 # set to "1" to automatically shut down via monitor.ts | |||
|
|||
volumes: | |||
# prometheus-data: {} | |||
grafana-data1: {} |
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.
nit: do we want the trailing 1
?
qq: why do we want a volume for one but not the other?
- grafana-data1:/var/lib/grafana | ||
- ./grafana/provisioning/:/etc/grafana/provisioning/ | ||
ports: | ||
- 3030:3000 |
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.
This port is already used for the blocklist client.
Description
Closes #1104
This just sets up metrics. Logs will come in a separate PR.
Changes
Testing Information
I tested this locally and everything worked as expected.
Checklist: