Skip to content

Agent Metric Config#30

Merged
FW-Nagorko merged 9 commits into
develfrom
agent/buffer
May 15, 2026
Merged

Agent Metric Config#30
FW-Nagorko merged 9 commits into
develfrom
agent/buffer

Conversation

@FW-Nagorko

@FW-Nagorko FW-Nagorko commented May 12, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a significant refactor and extension of the agent's metrics collection subsystem. The main changes implement a registry-based collector system, unify and extend the collector interface, and add support for dynamically selecting and configuring metrics at startup via config

Collector System Refactor and Extension:

  • Introduced a CollectorRegistry singleton and a RegisteredCollector template to allow automatic registration and dynamic resolution of collectors based on requested metric types. The collector interface now includes IsSupported, Satisfiable, and SetRequestedMetrics methods, enabling runtime selection and configuration of collectors. (collector.h, nvml_collector.h, proc_stat_collector.h, ram_collector.h, rapl_collector.h) [1] [2] [3] [4] [5] [6]

  • Updated all collector implementations (RaplCollector, NvmlCollector, ProcStatCollector, RamCollector) to support the new interface. Each collector now only returns metrics if requested, advertises its capabilities, and checks for platform support at runtime. (rapl_collector.cc, nvml_collector.cc, proc_stat_collector.cc, ram_collector.cc) [1] [2] [3] [4]

Build and Directory Structure:

  • Changed the CMake build to generate protobuf/gRPC files into a dedicated gen/ directory instead of the build directory, and updated include paths accordingly. (CMakeLists.txt) [1] [2]

  • Added build/* and gen/* to .gitignore to avoid committing generated or build files. (.gitignore)

Configuration and Metric Types:

  • Updated the example agent configuration to show how to enable CPU and GPU power metrics via the new metrics field. (agent.example.conf)

Metric Representation:

  • All collectors now use strongly typed metric identifiers (v1::MetricType) defined in volta.proto instead of string names, improving type safety and consistency across the codebase. [1] [2] [3] [4]

@kox13 kox13 self-requested a review May 15, 2026 11:35
@kox13 kox13 added the enhancement New feature or request label May 15, 2026
@kox13 kox13 added this to volta May 15, 2026
Comment thread sources/agent/src/collectors/collector.h

@kox13 kox13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@FW-Nagorko FW-Nagorko merged commit 7eb7b5e into devel May 15, 2026
1 check passed
@FW-Nagorko FW-Nagorko deleted the agent/buffer branch May 15, 2026 13:04
@github-project-automation github-project-automation Bot moved this to Done in volta May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants