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

Add prometheus metrics for monitoring #110

Merged
merged 46 commits into from
Mar 10, 2025

Conversation

aditya1702
Copy link
Contributor

@aditya1702 aditya1702 commented Jan 24, 2025

What

  • Start separate prometheus servers for api and ingest services. Note that while the prometheus servers are separate, the metrics are collected on the same grafana server.

Why

We want to setup a proper monitoring framework for the wallet-backend.

Known limitations

NA

Issue that this PR addresses

Closes #99

Checklist

PR Structure

  • It is not possible to break this PR down into smaller PRs.
  • This PR does not mix refactoring changes with feature changes.
  • This PR's title starts with name of package that is most changed in the PR, or all if the changes are broad or impact many packages.

Thoroughness

  • This PR adds tests for the new functionality or fixes.
  • All updated queries have been tested (refer to this check if the data set returned by the updated query is expected to be same as the original one).

Release

  • This is not a breaking change.
  • This is ready to be tested in development.
  • The new functionality is gated with a feature flag if this is not ready for production.

@aditya1702 aditya1702 marked this pull request as ready for review January 24, 2025 21:43
Copy link
Contributor

@gouthamp-stellar gouthamp-stellar left a comment

Choose a reason for hiding this comment

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

Is this pr capturing all the metrics listed in the https://docs.google.com/document/d/1xx0srb5MnVaK4x8cjQniauKsDroKEzL841yVmBfXYZk/edit?tab=t.0#heading=h.5lnmdqf1727m or is that coming in a future pr?

@aditya1702
Copy link
Contributor Author

Is this pr capturing all the metrics listed in the https://docs.google.com/document/d/1xx0srb5MnVaK4x8cjQniauKsDroKEzL841yVmBfXYZk/edit?tab=t.0#heading=h.5lnmdqf1727m or is that coming in a future pr?

@gouthamp-stellar Yes due to lot of metrics, I will break it into smaller PRs

Copy link
Contributor

@gouthamp-stellar gouthamp-stellar left a comment

Choose a reason for hiding this comment

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

A couple more changes I pointed out that would be nice to make here

if cfg.MetricsService != nil {
cfg.MetricsService.RegisterPoolMetrics(WebhookChannelName, pool)
}
return webhookPool
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we logging stats like when we have send success/failure to the webhook?

Copy link
Contributor

@gouthamp-stellar gouthamp-stellar left a comment

Choose a reason for hiding this comment

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

Take a look at my comments and let me know what you think

@JakeUrban
Copy link
Contributor

@aditya1702 if this is ready to merge, lets do it. I removed the requirement of reviews for the time being.

@aditya1702 aditya1702 merged commit f0b66b9 into stellar:main Mar 10, 2025
5 checks passed
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.

[EPIC] Implement grafana integration in the wallet backend
3 participants