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: add prometheus metrics #572

Merged
merged 10 commits into from
Mar 22, 2025
Merged

feat: add prometheus metrics #572

merged 10 commits into from
Mar 22, 2025

Conversation

sfroment
Copy link
Member

What type of PR is this?

Add prometheus gossip sub metrics

  • Feature

Description

Implment the gossip sub metrics register to work with prometheus

Related Issues and PRs

Added/updated tests?

  • No, because why: justify why you didn't add tests

Additional Info

add instructions or screenshots on what you might think is relevant or instructions on how to manually test it

[optional] Do we need to perform any post-deployment tasks?

@sfroment sfroment force-pushed the feat/prometheus-metrics branch 2 times, most recently from 89433a8 to dba7773 Compare March 17, 2025 14:33
Signed-off-by: Sacha Froment <[email protected]>
Copy link

github-actions bot commented Mar 17, 2025

Flamegraph.com report

flamegraph.pprof
See in flamegraph.com

Created by Flamegraph.com Github Action

Copy link

github-actions bot commented Mar 17, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 86.07% 3314 / 3850
🔵 Statements 86.07% 3314 / 3850
🔵 Functions 84.65% 309 / 365
🔵 Branches 85.17% 896 / 1052
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/network/src/node.ts 72.72% 66.66% 58.06% 72.72% 163-164, 194-199, 205-207, 250-254, 276-278, 281-283, 287-289, 296-297, 301-312, 315-321, 324-331, 334-340, 343-348, 351-352, 363-366, 369-372, 381-382, 392-393, 397-409, 423-424
packages/network/src/metrics/polyfill-process.ts 89.74% 77.77% 100% 89.74% 53-54, 57-58
packages/network/src/metrics/prometheus.ts 100% 93.18% 100% 100%
packages/types/src/network.ts 0% 0% 0% 0%
Generated in workflow #2558 for commit e4e6088 by the Vitest Coverage Report Action

Signed-off-by: Sacha Froment <[email protected]>
@sfroment sfroment force-pushed the feat/prometheus-metrics branch from a347d29 to 70de130 Compare March 17, 2025 15:21
Signed-off-by: Sacha Froment <[email protected]>
* origin:
  style: 🎨 allow printWidth 120 (#596)
  fix: use the correct obj (#595)
  Feat: interval drp reconnect bootstrap (#579)
  fix(interval-discovery)!: now use a != topic in order not to have many invalid operation logs (#589)
  feat!: restrict set key access (#582)
  fix: log_config pass down to disco interval (#590)
  feat(object): drpobject become generic (#565)
  chore(deps): bump @opentelemetry/sdk-trace-web from 1.30.1 to 2.0.0 (#585)
  fix!: testcase handle sync message correctly (#588)
  feat: expose the peerId that created the operations (#551)
  Fix: testcase incorrect (#557)
  chore(deps-dev): bump eslint-import-resolver-typescript from 3.8.7 to 4.2.0 (#583)
  fix: add log config to createObject option to be passed down to finality store (#574)
  feat: add logger template (#576)
Signed-off-by: Sacha Froment <[email protected]>
@sfroment sfroment force-pushed the feat/prometheus-metrics branch from c95e828 to f1efb55 Compare March 20, 2025 16:37
Copy link
Member

@JanLewDev JanLewDev left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@anhnd350309 anhnd350309 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@trungnotchung trungnotchung left a comment

Choose a reason for hiding this comment

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

lgtm

* origin:
  feat!: utilize context in acl (#592)
  fix: benchmark cache key and when to save it (#602)
  feat: add node bench (#598)
  fix: key docs (#601)
  fix: add serializer benchmark to the benchmark (#600)
  fix: cache key (#599)

Signed-off-by: Sacha Froment <[email protected]>
@sfroment sfroment force-pushed the feat/prometheus-metrics branch from e1b89be to 9a9a6f9 Compare March 22, 2025 11:55
Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
…heus-metrics

* origin:
  fix: remove duplicate bench (#603)

* main:
  fix: remove duplicate bench
@sfroment sfroment merged commit e946e95 into main Mar 22, 2025
15 checks passed
sfroment added a commit that referenced this pull request Mar 22, 2025
* origin:
  feat: add prometheus metrics (#572)
sfroment added a commit that referenced this pull request Mar 22, 2025
* origin:
  feat: add prometheus metrics (#572)
  fix: remove duplicate bench (#603)
  feat!: utilize context in acl (#592)
  fix: benchmark cache key and when to save it (#602)
  feat: add node bench (#598)
  fix: key docs (#601)
  fix: add serializer benchmark to the benchmark (#600)
  fix: cache key (#599)
@d-roak d-roak deleted the feat/prometheus-metrics branch March 24, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] - implement MetricsRegister
4 participants