codecentric / codecentric/spring-boot-admin
Enhancement: Aggregate fetching of metrics on the backend
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.9k
- Forks
- 3.1k
- Avg merge
- 19h 1m
- Merged PRs (30d)
- 61
Description
Hello.
As of today, when SBA shows the details of an instance, it has to do N+1 calls to the server to:
- fetch the list of available metrics (1)
- fetch each single metric value (N)
The improvement requested here is to aggregate all the metrics in a single DTO and publish that one instead, ideally through event subscription like it already happens with the journal, so that the UI shouldn't have to manually poll them every time.
Of course, there will still be N+1 network calls, but now only between SBA server and the target application instance and not, as of today, N+1 between SBA UI and SBA server and N+1 between SBA server and target instance.
Moreover, for the monitored services, they will always be N+1 and not M(N+1) where M is the number of SBA UIs open.
The same can then simply be reused in the metrics view of an instance by picking/filtering only the metrics of interest (the ones selected).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing metrics fetching flow and the journal event subscription path in the SBA backend and UI. Define how one aggregate metrics DTO or event would replace the current repeated requests, then verify that the metrics view can filter the aggregate to the selected metrics and that monitored services avoid duplicate polling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100