Skip to content

fix(byoo): avoid duplicate metric subset labels - #535

Merged
kristinapathak merged 1 commit into
mainfrom
kpathak/fix-byoo-prometheus-duplicate-labels
Jul 29, 2026
Merged

fix(byoo): avoid duplicate metric subset labels#535
kristinapathak merged 1 commit into
mainfrom
kpathak/fix-byoo-prometheus-duplicate-labels

Conversation

@kristinapathak

@kristinapathak kristinapathak commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

TL;DR

Disable resource-to-telemetry conversion in the Prometheus-only BYOO metric-subset exporter so required BYOO metric labels have one source.

Additional Details

  • The subset pipeline keeps resource cleanup and metrics_transform.
  • metrics_transform injects required NVCF metadata from environment variables, including NCA, provider, instance, host, function/version, region or zone, origin, and task identifiers.
  • Resource-to-telemetry conversion also copies application resource attributes into metric data points. Prometheus normalizes dotted resource names such as function.id to function_id, which collides with the transform-created label of the same name.
  • The customer metrics pipeline is unchanged. The rendered metric-subset example and patch version are updated.

For the Reviewer

Review addMetricSubsetExporter and the metric-subset pipeline in src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render.go.

For QA

  • GOCACHE=/private/tmp/byoo-prometheus-labels-go-cache go test ./internal/otelconfig -count=1
  • GOCACHE=/private/tmp/byoo-prometheus-labels-go-cache go test ./...
  • GOCACHE=/private/tmp/byoo-prometheus-labels-go-cache make validate-otelconfig was attempted. The local otelcol build exceeded five minutes before config validation began.

QA is not needed for this generated configuration change.

Issues

Fixes #534

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

  • Improvements
    • Updated the bundled metric subset remote-write exporter configuration to omit resource_to_telemetry_conversion.
    • Advanced the bundled OpenTelemetry Collector version to 0.157.3.
  • Tests
    • Updated configuration generation/validation expectations to match the simplified metric subset exporter configuration.

@kristinapathak
kristinapathak requested a review from a team as a code owner July 29, 2026 18:48
@kristinapathak
kristinapathak requested a review from estroz July 29, 2026 18:48
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The metric subset Prometheus exporter no longer enables resource-to-telemetry conversion. The rendered configuration, Kubernetes example, and test expectations are updated, and the collector version is incremented to 0.157.3.

Changes

Metric subset exporter

Layer / File(s) Summary
Disable resource-to-telemetry conversion
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, src/compute-plane-services/byoo-otel-collector/internal/otelconfig/render_test.go
The metric subset Prometheus exporter configuration and its expected example output no longer include resource_to_telemetry_conversion.
Increment collector version
src/compute-plane-services/byoo-otel-collector/VERSION
The collector version changes from 0.157.2 to 0.157.3.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • NVIDIA/nvcf#506: Updates the same collector version file in the preceding version bump.

Suggested reviewers: estroz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR disables resource-to-telemetry conversion in the metric-subset exporter, matching issue #534's required fix.
Out of Scope Changes check ✅ Passed The version bump and example/test updates are directly tied to the exporter behavior change and appear in scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits and accurately describes the bug fix to prevent duplicate metric subset labels.
✨ Finishing Touches
📝 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-byoo-prometheus-duplicate-labels

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

Refs #534

Signed-off-by: Kristina Pathak <kpathak@nvidia.com>
@kristinapathak
kristinapathak force-pushed the kpathak/fix-byoo-prometheus-duplicate-labels branch from 8dfbf93 to e9d2b0c Compare July 29, 2026 19:33
@kristinapathak
kristinapathak added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit 7de7a58 Jul 29, 2026
20 checks passed
@kristinapathak
kristinapathak deleted the kpathak/fix-byoo-prometheus-duplicate-labels branch July 29, 2026 23:27
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): avoid duplicate labels in metric subset

2 participants