codecentric / codecentric/spring-boot-admin

Enhancement: Aggregate fetching of metrics on the backend

Open
#5,287 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.