-
Notifications
You must be signed in to change notification settings - Fork 229
[Docpoc] SDP monitoring #2059
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
[Docpoc] SDP monitoring #2059
Conversation
JiahuiWho
commented
Nov 21, 2025
- metrics endpoints and the environment variables
- steps to launch the bundled Prometheus + Grafana stack
- instructions for importing Grafana dashboard JSON or wiring into user's own.
- links to Grafana README.md that explains metrics
|
Preview is available here: |
philipliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
platforms/stellar-disbursement-platform/admin-guide/monitoring.mdx
Outdated
Show resolved
Hide resolved
|
|
||
| Both the Dashboard API and the Transaction Submission Service (TSS) expose Prometheus-compatible `/metrics` endpoints. The HTTP server is defined in `internal/serve/serve_metrics.go` and is controlled through the following environment variables: | ||
|
|
||
| - `METRICS_PORT` – Port used by the Dashboard API metrics server (defaults to [8002](https://github.com/stellar/stellar-disbursement-platform-backend/blob/develop/dev/docker-compose-sdp.yml)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the port that Prometheus will scrape the metrics from, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. METRICS_PORT is the port where the Dashboard API exposes its /metrics endpoint, and that’s the same port Prometheus scrapes (see prometheus here, which targets host.docker.internal:8002/metrics by default).
| - `METRICS_PORT` – Port used by the Dashboard API metrics server (defaults to [8002](https://github.com/stellar/stellar-disbursement-platform-backend/blob/develop/dev/docker-compose-sdp.yml)). | ||
| - `METRICS_TYPE` – Monitoring backend in use (currently `PROMETHEUS`). | ||
| - `TSS_METRICS_PORT` – Port used by the TSS metrics server (defaults to [9002](https://github.com/stellar/stellar-disbursement-platform-backend/blob/develop/dev/docker-compose-tss.yml)). | ||
| - `TSS_METRICS_TYPE` – Monitoring backend for the TSS (defaults to `TSS_PROMETHEUS`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should rename this to PROMETHEUS for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TSS_METRICS_TYPE is currently TSS_PROMETHEUS because that’s the value the CLI, env vars, and Helm chart expect. Renaming it to PROMETHEUS would require code/config changes, so the doc needs to reflect the existing TSS_PROMETHEUS name until that work happens.
platforms/stellar-disbursement-platform/admin-guide/monitoring.mdx
Outdated
Show resolved
Hide resolved
|
|
||
| ### Integrating with External Prometheus Instances | ||
|
|
||
| If you already operate a Prometheus cluster, add scrape jobs equivalent to the ones in [prometheus config](https://github.com/stellar/stellar-disbursement-platform-backend/blob/develop/dev/prometheus/prometheus.yml). Each subsystem exposes metrics at `http://<host>:<METRICS_PORT>/metrics` (Dashboard API) and `http://<host>:<TSS_METRICS_PORT>/metrics` (TSS). [Helm](https://github.com/stellar/stellar-disbursement-platform-backend/blob/develop/helmchart/sdp/values.yaml) deployments expose the same configuration knobs through `sdp.configMap.data.METRICS_*` and `tss.configMap.data.TSS_METRICS_*`. Once the new jobs are present, you can import the same dashboard JSON into your existing Grafana deployment or adapt the PromQL queries to your preferred observability suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the new jobs are present
What does this mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you already run Prometheus elsewhere, add equivalent scrape jobs (one for the Dashboard API /metrics endpoint on METRICS_PORT, and optionally another for the TSS endpoint on TSS_METRICS_PORT). After you’ve added those jobs to your own prometheus.yml, you can import the Grafana dashboard JSON and it will work because Prometheus now collects the same metrics the dashboard expects.
|
Preview is available here: |