Skip to content
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(torch): add new metric to expose the consensus nodes ids #6

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

tty47
Copy link

@tty47 tty47 commented Jan 25, 2024

hello!

This PR adds a new metric to expose the consensus nodes ids.

as a result, we will have something like:

# HELP consensus_node_ids_metric Metric for Consensus Node IDs
# TYPE consensus_node_ids_metric gauge
consensus_node_ids_metric{namespace="robusta-torch-1",node_id="190da74cda99235421a8df1e3b412e9902800a38",node_name="consensus-full-1",otel_scope_name="torch",otel_scope_version=""} 1
consensus_node_ids_metric{namespace="robusta-torch-1",node_id="321531224ce99495ceba205e56dd955b8fcdbbb0",node_name="consensus-validator-1",otel_scope_name="torch",otel_scope_version=""} 1

In Grafana, I have added this table, so it will help our teams:

Screenshot 2024-01-25 at 16 26 47

cheers! 🚀

closes: https://github.com/celestiaorg/devops/issues/775
cc: @celestiaorg/devops

Signed-off-by: Jose Ramon Mañes <jose@celestia.org>
@tty47 tty47 self-assigned this Jan 25, 2024
@tty47 tty47 added the enhancement New feature or request label Jan 25, 2024
Signed-off-by: Jose Ramon Mañes <jose@celestia.org>
@tty47 tty47 requested a review from a team January 25, 2024 15:50
Copy link
Member

@Bidon15 Bidon15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome refactoring man!
Let's have a 2nd round and merge and :shipit:

pkg/http/server.go Outdated Show resolved Hide resolved
pkg/http/server.go Outdated Show resolved Hide resolved
pkg/http/server.go Outdated Show resolved Hide resolved
pkg/http/server.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Show resolved Hide resolved
pkg/nodes/consensus.go Outdated Show resolved Hide resolved
Signed-off-by: Jose Ramon Mañes <jose@celestia.org>
@tty47
Copy link
Author

tty47 commented Jan 26, 2024

I have also added to this PR the log level and a custom format to see the file name and line in the logs, example:

time="2024-01-26T12:20:31Z" level=info msg="LOG_LEVEL: debug" file="cmd/main.go:63"

@tty47 tty47 requested a review from Bidon15 January 26, 2024 12:29
Copy link
Member

@Bidon15 Bidon15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgmt. We can iterate on changes later

@tty47 tty47 merged commit e199718 into main Jan 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants