Skip to content

Agent Metric Config#30

Open
FW-Nagorko wants to merge 9 commits into
develfrom
agent/buffer
Open

Agent Metric Config#30
FW-Nagorko wants to merge 9 commits into
develfrom
agent/buffer

Conversation

@FW-Nagorko
Copy link
Copy Markdown
Collaborator

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

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants