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: implement prometheus metrics for base node #3563

Merged
merged 7 commits into from
Nov 15, 2021

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Nov 11, 2021

Description

  • Instrument tari_comms for prometheus metrics
  • add metrics feature to base node and tari_comms
  • add prometheus metrics scrape server
  • add prometheus push client
  • add configuration for metrics common.metrics
  • add get-network-stats command
  • fix bug in value for last request latency

Motivation and Context

Increase base node visibility

image

Dependencies

  • warp for http metric pull server
  • reqwest for metric push client
  • prometheus for instrumentation

How Has This Been Tested?

Manually

  • run prometheus docker run --rm -it -p 9090:9090 -v `pwd`/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
  • run base node(s) with --metrics-bind-addr 127.0.0.1:5544
  • visit localhost:9090
# prometheus.yml
scrape_configs:
  - job_name: 'node1'
    scrape_interval: 5s
    metrics_path: "/metrics"
    static_configs:
      - targets: ['host.docker.internal:5544']
        labels:
          node: 'node1'

@sdbondi sdbondi force-pushed the comms-rpc-get-stats branch 4 times, most recently from 4ab09cb to 6597385 Compare November 12, 2021 13:08
@delta1
Copy link
Contributor

delta1 commented Nov 12, 2021

Looks good will try it out. Random test failure that might have been fixed on dev?

@sdbondi sdbondi force-pushed the comms-rpc-get-stats branch 2 times, most recently from f73577e to 0a5c635 Compare November 13, 2021 09:56
@sdbondi

This comment has been minimized.

stringhandler
stringhandler previously approved these changes Nov 15, 2021
Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

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

Nice. I'm personally not a big fan of having many different compile time features, because you then have to create a matrix of possibilities to compile and test against. But that said, I see why you did it here, and I might have done the same.

Happy for it to go in

* development:
  feat: implement multiple read single write for sqlite (tari-project#3568)
@aviator-app aviator-app bot removed the mq-failed label Nov 15, 2021
@aviator-app aviator-app bot merged commit 433bc46 into tari-project:development Nov 15, 2021
@sdbondi sdbondi deleted the comms-rpc-get-stats branch November 15, 2021 13:33
sdbondi added a commit to sdbondi/tari that referenced this pull request Nov 18, 2021
* development: (32 commits)
  feat: add atomic swap refund transaction handling (tari-project#3573)
  feat: improve wallet connectivity status for console wallet (tari-project#3577)
  v0.21.1
  feat: add error codes to LibWallet for CipherSeed errors (tari-project#3578)
  ci: split cucumber job into two (tari-project#3583)
  feat(wallet): import utxo’s as EncumberedToBeReceived rather than Unspent (tari-project#3575)
  docs: rfc 0250_Covenants (tari-project#3574)
  feat: get fee for transactions for stratum transcoder (tari-project#3571)
  test: make monerod stagenet usage resilient (tari-project#3572)
  feat: add atomic swap htlc sending and claiming (tari-project#3552)
  feat: implement prometheus metrics for base node (tari-project#3563)
  feat: implement multiple read single write for sqlite (tari-project#3568)
  feat: trigger time lock balance update when block received (tari-project#3567)
  test: reduce cucumber ci to critical only (tari-project#3566)
  test: fix cucumber console wallet startup (tari-project#3564)
  chore: add node id/public key to log mdc (tari-project#3559)
  fix: avoid implicit using of the time crate (tari-project#3562)
  feat: one-click installer - cli edition (tari-project#3534)
  ci: add workflow dispatch to libwallet build action (tari-project#3556)
  fix: stop leak of value of recovered output (tari-project#3558)
  ...
@sdbondi sdbondi restored the comms-rpc-get-stats branch February 3, 2022 05:27
@sdbondi sdbondi deleted the comms-rpc-get-stats branch January 23, 2024 11:43
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.

None yet

3 participants