Skip to content

fix(byoo-otel-collector): preserve workload metric drop labels - #1007

Open
kristinapathak wants to merge 1 commit into
mainfrom
kpathak/fix-nvbug-6632587-byoo-drop-labels
Open

fix(byoo-otel-collector): preserve workload metric drop labels#1007
kristinapathak wants to merge 1 commit into
mainfrom
kpathak/fix-nvbug-6632587-byoo-drop-labels

Conversation

@kristinapathak

@kristinapathak kristinapathak commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

TL;DR

  • Preserve the default metric_subset_enabled drop label when users configure additional workload metric labels.
  • Apply workload metric label drops to both the primary metrics pipeline and the metric subset endpoint.

Additional Details

  • Custom labels now extend the default only when the metric subset pipeline is enabled.
  • Regenerated the metric-subset example and documented the additive behavior.

For the Reviewer

  • Review the shared processor placement in internal/otelconfig/render.go.

For QA

  • No cluster QA is required. Generated collector configurations validate the metric-subset processor ordering.

Issues

Closes #1006

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • Bug Fixes

    • Workload metric labels configured for removal are now also removed from the optional metric subset endpoint.
    • Custom labels extend the default metric_subset_enabled label removal behavior.
  • Documentation

    • Updated configuration examples and guidance to clarify label removal across primary and metric subset metrics pipelines.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 237a1509-1cd7-403c-a56c-4bb1e19b88b4

📥 Commits

Reviewing files that changed from the base of the PR and between 70cdd17 and ab46f1f.

📒 Files selected for processing (7)
  • docs/ngc-managed/cluster-management/configuration.md
  • docs/user/cluster-management/configuration.md
  • src/compute-plane-services/byoo-otel-collector/README.md
  • src/compute-plane-services/byoo-otel-collector/examples/otelconfigs/k8s/config_function_container_metric_subset.yaml
  • src/compute-plane-services/byoo-otel-collector/internal/otelconfig/otelconfig_test.go
  • src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render.go
  • src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render_test.go

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

BYOO workload metric drop labels now extend the default metric_subset_enabled label and apply to both the primary metrics pipeline and the metric subset endpoint. Pipeline construction, tests, examples, and documentation reflect this behavior.

Changes

BYOO metric subset label handling

Layer / File(s) Summary
Default and configured label handling
src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render.go, src/compute-plane-services/byoo-otel-collector/internal/otelconfig/otelconfig_test.go, src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render_test.go
Metric subset processing preserves metric_subset_enabled and adds configured workload metric labels to the drop list. Tests verify deletion of default and custom labels.
Metric subset pipeline wiring
src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render.go, src/compute-plane-services/byoo-otel-collector/examples/otelconfigs/k8s/config_function_container_metric_subset.yaml
The shared workload label-drop processor is added to the metric subset pipeline before transformation and batching.
Behavior validation and documentation
src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render_test.go, src/compute-plane-services/byoo-otel-collector/README.md, docs/ngc-managed/cluster-management/configuration.md, docs/user/cluster-management/configuration.md
Tests verify processor placement. Documentation describes configured labels as extensions of the default label removal for both metrics pipelines.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to ab46f

The change preserves configured workload metric drop labels across the affected metrics paths and updates documentation; no actionable merge-blocking risk remains after normal validation and review.

Sequence Diagram(s)

sequenceDiagram
  participant MetricPipelineConstruction
  participant addMetricSubsetPipeline
  participant WorkloadDropLabelProcessor
  participant MetricsTransform
  MetricPipelineConstruction->>addMetricSubsetPipeline: pass workload drop-label processor ID
  addMetricSubsetPipeline->>WorkloadDropLabelProcessor: insert processor
  WorkloadDropLabelProcessor->>MetricsTransform: apply configured and default label drops
Loading

Suggested reviewers: famousdirector

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required Conventional Commits format and accurately describes the bug fix.
Linked Issues check ✅ Passed The changes preserve the default label, apply configured drops to both pipelines, and document the additive behavior [#1006].
Out of Scope Changes check ✅ Passed All code, documentation, configuration, and test changes directly support the linked issue objectives.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kpathak/fix-nvbug-6632587-byoo-drop-labels

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: -mod may only be set to readonly or vendor when in workspace mode, but it is set to "mod"\n\tRemove the -mod flag to use the default readonly value, \n\tor set GOWORK=off to disable workspace mode.\n"


Comment @coderabbitai help to get the list of available commands.

@kristinapathak
kristinapathak marked this pull request as ready for review August 19, 2026 20:07
@kristinapathak
kristinapathak requested review from a team as code owners August 19, 2026 20:07
Signed-off-by: Kristina Pathak <kpathak@nvidia.com>
@kristinapathak
kristinapathak force-pushed the kpathak/fix-nvbug-6632587-byoo-drop-labels branch from ab46f1f to ebe7efa Compare August 19, 2026 20:09
@github-actions

Copy link
Copy Markdown
Contributor

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.

fix(byoo-otel-collector): preserve metric subset label drops

2 participants