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

chore: add additional metrics (websockets / node stats) #778

Merged
merged 17 commits into from
Jul 17, 2024

Conversation

darrenvechain
Copy link
Member

Description

Adding metrics around subscriptions and node stats

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

TODO

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@darrenvechain darrenvechain requested a review from a team as a code owner June 21, 2024 15:21
@darrenvechain darrenvechain marked this pull request as draft June 21, 2024 15:21
@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 62.06897% with 11 lines in your changes missing coverage. Please review.

Project coverage is 62.13%. Comparing base (6c62498) to head (e003a86).

Files Patch % Lines
metrics/prometheus.go 20.00% 4 Missing ⚠️
cmd/thor/node/node.go 0.00% 3 Missing ⚠️
cmd/thor/node/packer_loop.go 0.00% 2 Missing ⚠️
metrics/noop.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #778      +/-   ##
==========================================
- Coverage   62.14%   62.13%   -0.01%     
==========================================
  Files         203      203              
  Lines       18688    18702      +14     
==========================================
+ Hits        11613    11620       +7     
- Misses       5975     5980       +5     
- Partials     1100     1102       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@darrenvechain darrenvechain marked this pull request as ready for review July 1, 2024 15:51
paologalligit
paologalligit previously approved these changes Jul 10, 2024
Copy link
Member

@paologalligit paologalligit left a comment

Choose a reason for hiding this comment

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

Looks good, just left a minor comment

return conn, closed, nil
paths := strings.Split(req.URL.Path, "/")
subject := "unknown"
if len(paths) > 2 {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add in a comment the format of the req.URL.Path we expect to receive? Also with an example, so to better understand what that third place element could be

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed that change

cmd/thor/node/metrics.go Outdated Show resolved Hide resolved
cmd/thor/node/node.go Show resolved Hide resolved
otherview
otherview previously approved these changes Jul 15, 2024
Copy link
Member

@otherview otherview left a comment

Choose a reason for hiding this comment

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

lgtm !

Perhaps a suggestion (if not done yet), would be a sanity check before merging, to test and updated/change the grafana charts locally and check that they make sense ?

@darrenvechain
Copy link
Member Author

@otherview screenshots of the affected metrics:

image image

@otherview otherview merged commit 1c7f29b into master Jul 17, 2024
13 checks passed
@otherview otherview deleted the darren/chore/additional-metrics branch July 17, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants