Repository navigation
telemetry: remove redundant category field from events - #1649
Conversation
Since e539a11 ("UTILS/CONFIG: Add config file reading.") src/utils/common/configuration.h includes <toml++/toml.hpp> directly, so any consumer needs tomlplusplus on its include path. doca_exporter.cpp includes common/configuration.h, so the DOCA telemetry plugin now fails to compile with: fatal error: toml++/toml.hpp: No such file or directory Adding nixl_common_dep mirrors what the Prometheus plugin already does in src/plugins/telemetry/prometheus/meson.build, which has carried this dependency since it was first introduced. This is currently invisible to CI because contrib/Dockerfile installs only doca-sdk-gpunetio / -verbs and not libdoca-sdk-telemetry-exporter-dev, so the cpp.has_header() guard in this file skips the entire DOCA plugin build. Anyone with the DOCA telemetry-exporter SDK installed hits this immediately on a clean rebuild. Verified: ninja -C build install + telemetryTest.* + prometheusTelemetryTest.* all pass (16/16). Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
Drop nixlTelemetryEvent::category_ and derive exporter behavior from the telemetry event type instead. The category value was redundant with the metric/event name, and both Prometheus and DOCA were exporting it as an extra label on every metric sample. This removes the category enum/string conversion path, drops the category label from Prometheus and DOCA metrics, and updates the telemetry readers, tests, and documentation to the new two-field event shape. The updateData argument-order cleanup is resolved as part of this change because both the event constructor and updateData now use (event_type, value). Bump TELEMETRY_VERSION to 3 because removing category_ changes the binary layout of nixlTelemetryEvent in the shared-memory cyclic buffer. The Python reader layout is updated at the same time to use the event type's uint32_t width. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' - Prometheus smoke confirmed agent metrics without category labels Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
|
👋 Hi e-eygin! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
|
👀 Investigating |
|
🤖 CI Triage Agent — I have all the evidence I need. Here is the complete diagnosis: Summary: Clang Format Check failed on PR #1649 — two function definitions in Root cause: The PR ( --- src/plugins/telemetry/prometheus/prometheus_exporter.cpp (before formatting)
+++ src/plugins/telemetry/prometheus/prometheus_exporter.cpp (after formatting)
@@ -131,8 +131,7 @@
void
-nixlTelemetryPrometheusExporter::registerCounter(const std::string &name,
- const std::string &help) {
+nixlTelemetryPrometheusExporter::registerCounter(const std::string &name, const std::string &help) {
-nixlTelemetryPrometheusExporter::registerGauge(const std::string &name,
- const std::string &help) {
+nixlTelemetryPrometheusExporter::registerGauge(const std::string &name, const std::string &help) {The old three-parameter signatures were wide enough to require wrapping; now that Implicated commit: File: Suggested fix: Run // Change from:
nixlTelemetryPrometheusExporter::registerCounter(const std::string &name,
const std::string &help) {
// To:
nixlTelemetryPrometheusExporter::registerCounter(const std::string &name, const std::string &help) {
// Change from:
nixlTelemetryPrometheusExporter::registerGauge(const std::string &name,
const std::string &help) {
// To:
nixlTelemetryPrometheusExporter::registerGauge(const std::string &name, const std::string &help) {The quickest way to fix it is to run Related: none |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR removes the telemetry category field and related APIs from the event structure, exporters, and readers. The protocol version increments from 2 to 3. All exporters are refactored to classify events by type rather than a separate category dimension. ChangesRemove telemetry category field and API
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/plugins/telemetry/prometheus/prometheus_exporter.cpp (1)
134-147:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix clang-format signature wrapping to unblock CI.
The current wrapping in these function declarations/definitions is causing the clang-format check to fail.
As per coding guidelines, “Formatting: 4-space indentation, no tabs; max 100-char lines; continuation lines indented by 4.”Proposed formatting fix
-void -nixlTelemetryPrometheusExporter::registerCounter(const std::string &name, - const std::string &help) { +void nixlTelemetryPrometheusExporter::registerCounter(const std::string &name, + const std::string &help) { @@ -void -nixlTelemetryPrometheusExporter::registerGauge(const std::string &name, - const std::string &help) { +void nixlTelemetryPrometheusExporter::registerGauge(const std::string &name, + const std::string &help) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/plugins/telemetry/prometheus/prometheus_exporter.cpp` around lines 134 - 147, The function signature wrapping for nixlTelemetryPrometheusExporter::registerCounter (and similarly for registerGauge) violates the project's clang-format rules; fix by reformatting the function declarations/definitions so the return type and function name/signature conform to the 4-space indentation and max-100-char line rules (either put the full signature on one line if it fits or break parameter list with continuation lines indented by 4 spaces), ensuring consistent wrapping for both registerCounter and registerGauge so clang-format/CI no longer fails.src/api/cpp/backend/backend_engine.h (1)
65-69:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winTake
telemetryEventsMutex_before checking the queue size.
telemetryEvents_.size()is read before the mutex is acquired, while Line 69 andgetTelemetryEvents()mutate the samestd::vectorundertelemetryEventsMutex_. That is a data race and a TOCTOU bug: under contention this can both invoke UB and let producers overshootMAX_TELEMETRY_QUEUE_SIZE.🐛 Proposed fix
void addTelemetryEvent(nixl_telemetry_event_type_t event_type, uint64_t value) { - if (!enableTelemetry_) return; - if (telemetryEvents_.size() >= MAX_TELEMETRY_QUEUE_SIZE) return; - std::lock_guard<std::mutex> lock(telemetryEventsMutex_); + if (!enableTelemetry_) { + return; + } + const std::lock_guard<std::mutex> lock(telemetryEventsMutex_); + if (telemetryEvents_.size() >= MAX_TELEMETRY_QUEUE_SIZE) { + return; + } telemetryEvents_.emplace_back(event_type, value); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/api/cpp/backend/backend_engine.h` around lines 65 - 69, In addTelemetryEvent, avoid the TOCTOU/data race by acquiring telemetryEventsMutex_ before reading or mutating telemetryEvents_; specifically move the std::lock_guard<std::mutex> lock(telemetryEventsMutex_) to before checking telemetryEvents_.size() and MAX_TELEMETRY_QUEUE_SIZE, then re-check the size under the lock and call telemetryEvents_.emplace_back(event_type, value); this ensures getTelemetryEvents() and other mutators that use telemetryEventsMutex_ synchronize correctly with addTelemetryEvent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/telemetry.md`:
- Line 82: The doc claim that readers "unlink the file on mismatch" is
inconsistent with the Python example; update either docs or code: either change
docs/telemetry.md wording around TELEMETRY_VERSION to state which
readers/unlinking runtime perform the unlink, or modify
examples/python/telemetry_reader.py to perform an unlink when TELEMETRY_VERSION
mismatches instead of only raising RuntimeError; locate the version-check logic
and the error path in telemetry_reader.py (search for TELEMETRY_VERSION and the
RuntimeError raised on mismatch) and implement os.unlink(file) on the mismatch
path or adjust the documentation text to clarify which implementations remove
the file.
---
Outside diff comments:
In `@src/api/cpp/backend/backend_engine.h`:
- Around line 65-69: In addTelemetryEvent, avoid the TOCTOU/data race by
acquiring telemetryEventsMutex_ before reading or mutating telemetryEvents_;
specifically move the std::lock_guard<std::mutex> lock(telemetryEventsMutex_) to
before checking telemetryEvents_.size() and MAX_TELEMETRY_QUEUE_SIZE, then
re-check the size under the lock and call
telemetryEvents_.emplace_back(event_type, value); this ensures
getTelemetryEvents() and other mutators that use telemetryEventsMutex_
synchronize correctly with addTelemetryEvent.
In `@src/plugins/telemetry/prometheus/prometheus_exporter.cpp`:
- Around line 134-147: The function signature wrapping for
nixlTelemetryPrometheusExporter::registerCounter (and similarly for
registerGauge) violates the project's clang-format rules; fix by reformatting
the function declarations/definitions so the return type and function
name/signature conform to the 4-space indentation and max-100-char line rules
(either put the full signature on one line if it fits or break parameter list
with continuation lines indented by 4 spaces), ensuring consistent wrapping for
both registerCounter and registerGauge so clang-format/CI no longer fails.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9d2f4925-7404-41ee-9b52-92126d1f7489
📒 Files selected for processing (16)
docs/telemetry.mdexamples/cpp/telemetry_reader.cppexamples/python/telemetry_reader.pysrc/api/cpp/backend/backend_engine.hsrc/core/telemetry/telemetry.cppsrc/core/telemetry/telemetry.hsrc/core/telemetry/telemetry_event.hsrc/plugins/telemetry/README.mdsrc/plugins/telemetry/doca/README.mdsrc/plugins/telemetry/doca/doca_exporter.cppsrc/plugins/telemetry/doca/meson.buildsrc/plugins/telemetry/prometheus/README.mdsrc/plugins/telemetry/prometheus/prometheus_exporter.cppsrc/plugins/telemetry/prometheus/prometheus_exporter.htest/gtest/telemetry_prometheus_test.cpptest/gtest/telemetry_test.cpp
💤 Files with no reviewable changes (1)
- examples/cpp/telemetry_reader.cpp
Run clang-format-19 on the shortened Prometheus exporter helper signatures after removing the category parameter. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
Clarify the TELEMETRY_VERSION mismatch behavior in the documentation: the C++ shared-ring-buffer reader unlinks mismatched files, while the Python example raises RuntimeError. Also move the backend telemetry queue size check under telemetryEventsMutex_ so addTelemetryEvent synchronizes all reads and writes of telemetryEvents_ with getTelemetryEvents(). Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
|
👀 Investigating |
|
🤖 CI Triage Agent — I have everything needed for a complete diagnosis. Here is the full report: Summary: Root cause: The commit // CURRENT (fails clang-format-19):
if (telemetryEvents_.size() >= MAX_TELEMETRY_QUEUE_SIZE) return;
// REQUIRED by .clang-format style:
if (telemetryEvents_.size() >= MAX_TELEMETRY_QUEUE_SIZE) {
return;
}The Implicated commit: File: Suggested fix: Expand the braceless void
addTelemetryEvent(nixl_telemetry_event_type_t event_type, uint64_t value) {
if (!enableTelemetry_) return;
std::lock_guard<std::mutex> lock(telemetryEventsMutex_);
if (telemetryEvents_.size() >= MAX_TELEMETRY_QUEUE_SIZE) {
return;
}
telemetryEvents_.emplace_back(event_type, value);
}The fastest way to do this locally is to run: clang-format-19 -i -style=file src/api/cpp/backend/backend_engine.hand then commit the result. This will auto-apply exactly the diff the CI checker expected. Related: #1531 (telemetry enum refactor by BatshevaBlack, last touch to this file), #1522 (Remove timestamp field from telemetry events) — no existing issue specifically for this clang-format violation. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/api/cpp/backend/backend_engine.h`:
- Line 65: The change to the public header method signature
addTelemetryEvent(nixl_telemetry_event_type_t event_type, uint64_t value) is an
API/ABI break for downstream consumers; restore backward compatibility by either
reverting the signature change or adding an overload/compatibility wrapper that
preserves the original symbol (e.g., keep the old addTelemetryEvent signature or
provide an inline forwarding overload in backend_engine.h) and ensure the
implementation in the corresponding .cpp forwards to the new behavior; also add
an explicit migration note to this PR (release notes/CHANGES) and notify
downstream maintainers of the breaking change so they can coordinate upgrades.
- Around line 66-69: Clang-format is failing due to single-line early-return if
statements; update the two ifs that use early returns to use explicit block
braces and proper newlines so formatting is consistent: replace "if
(!enableTelemetry_) return;" with a braced form like "if (!enableTelemetry_) {
return; }" and similarly replace "if (telemetryEvents_.size() >=
MAX_TELEMETRY_QUEUE_SIZE) return;" with "if (telemetryEvents_.size() >=
MAX_TELEMETRY_QUEUE_SIZE) { return; }" around the telemetry-related symbols
enableTelemetry_, telemetryEvents_, MAX_TELEMETRY_QUEUE_SIZE and keep the
existing std::lock_guard<std::mutex> lock(telemetryEventsMutex_) and
telemetryEvents_.emplace_back(event_type, value); lines unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2ef9a66e-721f-4caf-9fff-9762a55b0046
📒 Files selected for processing (3)
docs/telemetry.mdsrc/api/cpp/backend/backend_engine.hsrc/plugins/telemetry/prometheus/prometheus_exporter.cpp
Expand the telemetryEvents_ capacity guard added in the review fix so the touched line follows the project's clang-format rules. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
Expand the enableTelemetry_ early return added to the PR diff so the touched code follows the project's braced-control-statement style. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
Mark the event-type classifier helpers constexpr and make the DOCA counter/gauge branches mutually exclusive in exportEvent. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
Add event-type prefix guidance in docs/telemetry.md so category-style filtering remains discoverable after removing the stored category field. Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
|
@brminich please review |
|
/build |
|
/ok to test 85988f2 |
|
/build |
|
/ok to test ecd6c36 |
|
/build |
|
/ok to test 5255ea7 |
|
/build |
3 similar comments
|
/build |
|
/build |
|
/build |
* telemetry/doca: add nixl_common_dep so tomlplusplus resolves Since e539a11 ("UTILS/CONFIG: Add config file reading.") src/utils/common/configuration.h includes <toml++/toml.hpp> directly, so any consumer needs tomlplusplus on its include path. doca_exporter.cpp includes common/configuration.h, so the DOCA telemetry plugin now fails to compile with: fatal error: toml++/toml.hpp: No such file or directory Adding nixl_common_dep mirrors what the Prometheus plugin already does in src/plugins/telemetry/prometheus/meson.build, which has carried this dependency since it was first introduced. This is currently invisible to CI because contrib/Dockerfile installs only doca-sdk-gpunetio / -verbs and not libdoca-sdk-telemetry-exporter-dev, so the cpp.has_header() guard in this file skips the entire DOCA plugin build. Anyone with the DOCA telemetry-exporter SDK installed hits this immediately on a clean rebuild. Verified: ninja -C build install + telemetryTest.* + prometheusTelemetryTest.* all pass (16/16). Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry: remove redundant category field from events Drop nixlTelemetryEvent::category_ and derive exporter behavior from the telemetry event type instead. The category value was redundant with the metric/event name, and both Prometheus and DOCA were exporting it as an extra label on every metric sample. This removes the category enum/string conversion path, drops the category label from Prometheus and DOCA metrics, and updates the telemetry readers, tests, and documentation to the new two-field event shape. The updateData argument-order cleanup is resolved as part of this change because both the event constructor and updateData now use (event_type, value). Bump TELEMETRY_VERSION to 3 because removing category_ changes the binary layout of nixlTelemetryEvent in the shared-memory cyclic buffer. The Python reader layout is updated at the same time to use the event type's uint32_t width. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' - Prometheus smoke confirmed agent metrics without category labels Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * style: format prometheus exporter signatures Run clang-format-19 on the shortened Prometheus exporter helper signatures after removing the category parameter. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry: address review comments on category removal Clarify the TELEMETRY_VERSION mismatch behavior in the documentation: the C++ shared-ring-buffer reader unlinks mismatched files, while the Python example raises RuntimeError. Also move the backend telemetry queue size check under telemetryEventsMutex_ so addTelemetryEvent synchronizes all reads and writes of telemetryEvents_ with getTelemetryEvents(). Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * style: brace backend telemetry queue guard Expand the telemetryEvents_ capacity guard added in the review fix so the touched line follows the project's clang-format rules. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * style: brace backend telemetry enable guard Expand the enableTelemetry_ early return added to the PR diff so the touched code follows the project's braced-control-statement style. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry/doca: address exporter review nits Mark the event-type classifier helpers constexpr and make the DOCA counter/gauge branches mutually exclusive in exportEvent. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry: document event type prefix filtering Add event-type prefix guidance in docs/telemetry.md so category-style filtering remains discoverable after removing the stored category field. Signed-off-by: Efraim Eygin <eeygin@nvidia.com> --------- Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
* NIXL: Move to C++20 Signed-off-by: Adit Ranadive <aranadive@nvidia.com> * NIXL: Add C++20 support for plugins Switch plugins to use C++20 and update READMEs. Signed-off-by: Adit Ranadive <aranadive@nvidia.com> * Fix copyright Signed-off-by: Adit Ranadive <aranadive@nvidia.com> * Fix review comments Signed-off-by: Adit Ranadive <aranadive@nvidia.com> * NIXL: Fix EP code for C++20 deprecation warnings Three -Werror sites flagged by GCC under -std=c++20 in the BUILD_NIXL_EP=true build: * nixl_ep.cpp:737 used a comma operator to chain two assignments to volatile-qualified pointers. C++20 deprecates using the value of an assignment to a volatile lvalue (P1152R4). Split into two statements. * nixl_ep.cpp:1080 and 1182 used [=] capture inside a member function, which implicitly captures *this. C++20 deprecates this form. Capture this explicitly via [=, this]. Signed-off-by: Adit Ranadive <aranadive@nvidia.com> * ci: Switch git URL to HTTPS and reduce fetch size (#1677) * CI: Change git URL from SSH to HTTPS Switch the SCM URL to HTTPS to fix 'Permission denied (publickey)' from 'git ls-remote'. SSH requires an SSH key, while HTTPS allows anonymous reads of public repos like nixl. Signed-off-by: Noam Tsemah <ntsemah@nvidia.com> * CI: Drop PR refs from fetch refspec Fetch only the commit via +$sha1:refs/remotes/origin/$sha1 instead of +refs/pull/* which fetch every PR. Signed-off-by: Noam Tsemah <ntsemah@nvidia.com> --------- Signed-off-by: Noam Tsemah <ntsemah@nvidia.com> * EXAMPLES/DEVICE/EP: Removed method w/o definition. (#1684) Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com> * nixl: bulk descriptor removal and empty-section cleanup (#1597) * nixl: erase empty sections in removeLocalData removeLocalData removes matching descriptors from the remote section but leaves the map entry in place once it is empty. In long-running workloads that repeatedly register and deregister, sectionMap and memToBackend grow without bound. Erase the map entry when the section becomes empty, mirroring the cleanup already done in remDescList. Signed-off-by: Ben Walker <ben@nvidia.com> * nixl: bulk removal for descriptor lists remDescList and removeLocalData removed descriptors one at a time via target.remDesc(index), giving O(N*M) work per deregister when the backend held N entries and the caller was removing M of them. The add side already has addDescs() for batched insertion; the remove side did not. Add nixlSecDescList::remDescs(std::vector<int> sorted_indices) which compacts the descriptor vector in a single pass. Collect indices in remDescList and removeLocalData and hand them to remDescs. Signed-off-by: Ben Walker <ben@nvidia.com> * test/gtest: reset registration list on Agent::init TestErrorHandling reuses the same Agent instances across testXfer calls within a single TEST_P. Each Agent::init() reassigns m_priv but the nested MemDesc is never reconstructed, so MemDesc::init() kept appending the same descriptor to m_dlist on every invocation. With BasicXfer running both NIXL_WRITE and NIXL_READ in sequence, the second registerMem on a fresh agent registered the same memory range twice, and the matching deregisterMem then asked the section to remove the same target index twice. The prior remove-one-at-a-time path in nixlRemoteSection::removeLocalData masked this: the first remDesc shifted the target so the second getIndex() returned -1. The new bulk path collects all indices up front, so unloadMD() is invoked twice on the same metadataP, double-freeing the UCX public metadata and segfaulting in the destructor. Clear m_dlist at the start of MemDesc::init() so a re-init() always yields the single registration the test expects. Signed-off-by: Ben Walker <ben@nvidia.com> --------- Signed-off-by: Ben Walker <ben@nvidia.com> * fix(ci): set build container NPROC/GRPC_NPROC explicitly (#1704) build-container.sh defaults NPROC to $(nproc), which inside the privileged podman runner reports the host node's full core count rather than the pod's cpu limit. The resulting over-parallel make exhausted the pod memory limit and OOM-killed the build unless NPROC was passed explicitly as a pipeline parameter. Set NPROC and GRPC_NPROC in the build-container job env (sized to the pod's 24Gi memory) and bump the job resources to 24Gi/12 cores. Signed-off-by: NirWolfer <nwolfer@nvidia.com> * telemetry/doca: add nixl_common_dep so tomlplusplus resolves (#1640) Since e539a11 ("UTILS/CONFIG: Add config file reading.") src/utils/common/configuration.h includes <toml++/toml.hpp> directly, so any consumer needs tomlplusplus on its include path. doca_exporter.cpp includes common/configuration.h, so the DOCA telemetry plugin now fails to compile with: fatal error: toml++/toml.hpp: No such file or directory Adding nixl_common_dep mirrors what the Prometheus plugin already does in src/plugins/telemetry/prometheus/meson.build, which has carried this dependency since it was first introduced. This is currently invisible to CI because contrib/Dockerfile installs only doca-sdk-gpunetio / -verbs and not libdoca-sdk-telemetry-exporter-dev, so the cpp.has_header() guard in this file skips the entire DOCA plugin build. Anyone with the DOCA telemetry-exporter SDK installed hits this immediately on a clean rebuild. Verified: ninja -C build install + telemetryTest.* + prometheusTelemetryTest.* all pass (16/16). Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry: remove redundant category field from events (#1649) * telemetry/doca: add nixl_common_dep so tomlplusplus resolves Since e539a11 ("UTILS/CONFIG: Add config file reading.") src/utils/common/configuration.h includes <toml++/toml.hpp> directly, so any consumer needs tomlplusplus on its include path. doca_exporter.cpp includes common/configuration.h, so the DOCA telemetry plugin now fails to compile with: fatal error: toml++/toml.hpp: No such file or directory Adding nixl_common_dep mirrors what the Prometheus plugin already does in src/plugins/telemetry/prometheus/meson.build, which has carried this dependency since it was first introduced. This is currently invisible to CI because contrib/Dockerfile installs only doca-sdk-gpunetio / -verbs and not libdoca-sdk-telemetry-exporter-dev, so the cpp.has_header() guard in this file skips the entire DOCA plugin build. Anyone with the DOCA telemetry-exporter SDK installed hits this immediately on a clean rebuild. Verified: ninja -C build install + telemetryTest.* + prometheusTelemetryTest.* all pass (16/16). Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry: remove redundant category field from events Drop nixlTelemetryEvent::category_ and derive exporter behavior from the telemetry event type instead. The category value was redundant with the metric/event name, and both Prometheus and DOCA were exporting it as an extra label on every metric sample. This removes the category enum/string conversion path, drops the category label from Prometheus and DOCA metrics, and updates the telemetry readers, tests, and documentation to the new two-field event shape. The updateData argument-order cleanup is resolved as part of this change because both the event constructor and updateData now use (event_type, value). Bump TELEMETRY_VERSION to 3 because removing category_ changes the binary layout of nixlTelemetryEvent in the shared-memory cyclic buffer. The Python reader layout is updated at the same time to use the event type's uint32_t width. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' - Prometheus smoke confirmed agent metrics without category labels Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * style: format prometheus exporter signatures Run clang-format-19 on the shortened Prometheus exporter helper signatures after removing the category parameter. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry: address review comments on category removal Clarify the TELEMETRY_VERSION mismatch behavior in the documentation: the C++ shared-ring-buffer reader unlinks mismatched files, while the Python example raises RuntimeError. Also move the backend telemetry queue size check under telemetryEventsMutex_ so addTelemetryEvent synchronizes all reads and writes of telemetryEvents_ with getTelemetryEvents(). Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * style: brace backend telemetry queue guard Expand the telemetryEvents_ capacity guard added in the review fix so the touched line follows the project's clang-format rules. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * style: brace backend telemetry enable guard Expand the enableTelemetry_ early return added to the PR diff so the touched code follows the project's braced-control-statement style. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry/doca: address exporter review nits Mark the event-type classifier helpers constexpr and make the DOCA counter/gauge branches mutually exclusive in exportEvent. Verified: - ninja -C build install - build/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*' Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * telemetry: document event type prefix filtering Add event-type prefix guidance in docs/telemetry.md so category-style filtering remains discoverable after removing the stored category field. Signed-off-by: Efraim Eygin <eeygin@nvidia.com> --------- Signed-off-by: Efraim Eygin <eeygin@nvidia.com> * NIXL: Update copyright year to 2025-2026 in docs Address review feedback on PR #1571: bump the copyright header in CONTRIBUTING.md and README.md to 2025-2026 for consistency with the rest of the tree. Signed-off-by: Adit Ranadive <aranadive@nvidia.com> * NIXL: Set CUDA C++20 project-wide in meson Build all CUDA targets with C++20 by adding the standard flag once in the root meson.build instead of only in the gpunetio plugin. This guarantees every CUDA target matches the core's C++ standard and ABI. Drop the now-redundant gpu_cuda_args from the gpunetio plugin. Signed-off-by: Adit Ranadive <aranadive@nvidia.com> * NIXL: Build CI dependencies with C++20 Build the bundled dependencies in .gitlab/build.sh with C++20 to keep the toolchain ABI-consistent with the C++20 core: - gRPC and etcd: bump CMAKE_CXX_STANDARD 17 -> 20 - abseil, aws-sdk, azure-sdk: add -DCMAKE_CXX_STANDARD=20 - gusli: build with CXX="g++ -std=c++20" Bump CI_IMAGE_TAG in all three jenkins matrices, as required by the CI guard when build.sh changes. Signed-off-by: Adit Ranadive <aranadive@nvidia.com> --------- Signed-off-by: Adit Ranadive <aranadive@nvidia.com> Signed-off-by: Noam Tsemah <ntsemah@nvidia.com> Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com> Signed-off-by: Ben Walker <ben@nvidia.com> Signed-off-by: NirWolfer <nwolfer@nvidia.com> Signed-off-by: Efraim Eygin <eeygin@nvidia.com> Co-authored-by: Noam Tsemah <ntsemah@nvidia.com> Co-authored-by: Raul Akhmetshin <74596089+rakhmets@users.noreply.github.com> Co-authored-by: Ben Walker <ben@nvidia.com> Co-authored-by: NirWolfer <82328769+NirWolfer@users.noreply.github.com> Co-authored-by: e-eygin <eeygin@nvidia.com>
Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com>
What?
This PR removes the redundant telemetry category field from
nixlTelemetryEvent.The event now carries only:
eventType_value_It also removes category-related runtime surfaces:
nixl_telemetry_category_t.nixlEnumStrings::telemetryCategoryStr.categorylabel from Prometheus and DOCA telemetry metrics.docs/telemetry.mdand telemetry exporter READMEs.TELEMETRY_VERSIONfrom2to3.This also resolves the separate
nixlTelemetry::updateDataargument-order cleanup request: once category is removed, bothnixlTelemetryEventconstruction andupdateDatause(event_type, value).Depends on #1640. Please review only commit
a330177for now. After #1640 merges, this branch will be rebased ontoai-dynamo/mainso the PR diff contains only the category-removal change.Why?
category_is fully derivable fromeventType_.For example:
AGENT_TX_BYTESis always a transfer metric.AGENT_MEMORY_REGISTEREDis always a memory metric.AGENT_XFER_TIMEis always a timing metric.Because of that, storing category in every telemetry event and exporting it as a metric label is redundant. The metric/event name already carries the meaning.
Removing it also deletes the category string conversion path and avoids emitting an extra
category=...label on every Prometheus / DOCA metric sample.TELEMETRY_VERSIONis bumped becausenixlTelemetryEventis serialized into the shared-memory cyclic buffer by binary layout. Removingcategory_changes field offsets, so readers must reject old buffer files instead of silently decoding them incorrectly. This follows the existing precedent from the timestamp-field removal, which bumped the version from1to2.How?
Core telemetry changes:
nixlTelemetryEventnow stores onlyeventType_andvalue_.nixlTelemetry::updateDatanow takes only(event_type, value).(event_type, value).Exporter changes:
hostnameandagent_namelabels.agent_namelabel;hostnameremains a constant source label.event.category_.Reader/docs/test changes:
uint32_t event_type, padding,uint64_t value).TELEMETRY_VERSION == 3andsizeof(nixlTelemetryEvent) == 16.docs/telemetry.mdnow documents theTELEMETRY_VERSIONpolicy.Validation:
ninja -C build installbuild/test/gtest/gtest --gtest_filter='telemetryTest.*:prometheusTelemetryTest.*'agent_nameandhostnamecategory=label was presentSummary by CodeRabbit
Refactor
Documentation
Examples
Tests