Skip to content

Additional metrics for virtual machine orchestration#13141

Open
sureshanaparti wants to merge 3 commits intoapache:4.22from
shapeblue:vm-additional-metrics-support
Open

Additional metrics for virtual machine orchestration#13141
sureshanaparti wants to merge 3 commits intoapache:4.22from
shapeblue:vm-additional-metrics-support

Conversation

@sureshanaparti
Copy link
Copy Markdown
Contributor

Description

This PR adds support for additional metrics for virtual machine orchestration.

  • Adds additional VM metrics to StatsCollector for enhanced observability.
  • Makes METRIC_REGISTRY public and adds a registerMetric() static helper for external metric registration.
  • Starts a JMX reporter under the vm-extra domain so metrics are visible via JMX.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

alakesh and others added 3 commits May 8, 2026 20:38
@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances observability around VM orchestration by expanding StatsCollector’s metrics exposure capabilities, including external registration and JMX visibility.

Changes:

  • Exposes METRIC_REGISTRY publicly and adds a static registerMetric() helper for external metric registration.
  • Starts a Dropwizard JmxReporter under the vm-extra JMX domain for metrics visibility via JMX.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +418 to +422
try {
JmxReporter.forRegistry(METRIC_REGISTRY).inDomain("vm-extra").build().start();
} catch (Exception e) {
logger.warn("Failed to start JMX reporter for METRIC_REGISTRY, metrics will not be visible via JMX", e);
}
Comment on lines +391 to +395
public static final MetricRegistry METRIC_REGISTRY = new MetricRegistry();

public static void registerMetric(String name, Metric metric) {
METRIC_REGISTRY.register(name, metric);
}
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

❌ Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.68%. Comparing base (4359198) to head (12f2f3f).

Files with missing lines Patch % Lines
...src/main/java/com/cloud/server/StatsCollector.java 11.11% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #13141   +/-   ##
=========================================
  Coverage     17.68%   17.68%           
- Complexity    15790    15791    +1     
=========================================
  Files          5922     5922           
  Lines        533119   533127    +8     
  Branches      65201    65201           
=========================================
+ Hits          94257    94260    +3     
- Misses       428219   428224    +5     
  Partials      10643    10643           
Flag Coverage Δ
uitests 3.69% <ø> (ø)
unittests 18.75% <11.11%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17790

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.

4 participants