Skip to content

[fix][broker] Add missing bundle Prometheus metrics for extensible load manager - #26192

Merged
Technoboy- merged 2 commits into
apache:masterfrom
Dream95:fix_miss_metric
Sep 1, 2026
Merged

Technoboy- merged 2 commits into
apache:masterfrom
Dream95:fix_miss_metric

Conversation

@Dream95

@Dream95 Dream95 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #23923

Main Issue: #xyz

PIP: #xyz

Motivation

exposeBundlesMetricsInPrometheus=true has no effect under ExtensibleLoadManagerImpl. Bundle metrics such as pulsar_bundle_topics_count are missing from the scrape output.
ModularLoadManagerImpl already publishes them.

Modifications

If exposeBundlesMetricsInPrometheus is enabled, ExtensibleLoadManagerImpl.getMetrics() now pulls
BrokerService#getBundleStats() and publishes the same brk_bundle_* metrics and labels that ModularLoadManagerImpl uses.

Verifying this change

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

@Technoboy-

Copy link
Copy Markdown
Contributor

@Dream95 could you add a test?

@Dream95

Dream95 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@Technoboy- The test has been added already.

@Technoboy- Technoboy- closed this Aug 31, 2026
@Technoboy- Technoboy- reopened this Aug 31, 2026
@Technoboy- Technoboy- added this to the 5.0.0-M2 milestone Aug 31, 2026
@Technoboy-
Technoboy- merged commit 41255fb into apache:master Sep 1, 2026
44 checks passed
lhotari pushed a commit that referenced this pull request Sep 2, 2026
lhotari pushed a commit that referenced this pull request Sep 2, 2026
lhotari added a commit that referenced this pull request Sep 12, 2026
…manager metrics test

Fix the test introduced by 9e5e368
([fix][broker] Add missing bundle Prometheus metrics for extensible load
manager, #26192), cherry-picked from
41255fb.

Upstream and branch-4.2 create "my-property/my-ns" in
BrokerTestBase.baseSetupCommon() following the V1 topic-name removal
(#25304; branch-4.2 commit 735b429). Branch-4.0 retains the older
setup, which creates "prop/ns-abc" but not "my-property/my-ns".
The backported metrics test used the newer setup's namespace and failed
with Namespace not found. Use "prop/ns-abc" for its producer and consumer.

Validation: testBundlesMetricsWithExtensibleLoadManager passes;
Checkstyle passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bundle metrics gone under ExtensibleLoadManager

3 participants