Skip to content

feat: Harvest should parse labels in CM pb files#4246

Merged
rahulguptajss merged 1 commit into
mainfrom
cbg-pb
Apr 23, 2026
Merged

feat: Harvest should parse labels in CM pb files#4246
rahulguptajss merged 1 commit into
mainfrom
cbg-pb

Conversation

@cgrinds
Copy link
Copy Markdown
Collaborator

@cgrinds cgrinds commented Apr 22, 2026

No description provided.

@cgrinds cgrinds requested a review from rahulguptajss as a code owner April 22, 2026 13:28
Copilot AI review requested due to automatic review settings April 22, 2026 13:28
@cgrinds cgrinds requested a review from Hardikl as a code owner April 22, 2026 13:28
@cla-bot cla-bot Bot added the cla-signed label Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables Harvest’s cmperf cmmetrics protobuf parser to read counter schema label fields (X/Y labels) so label metadata in CM .pb files is preserved and testable.

Changes:

  • Implement parsing of counter_x_labels (field 6) and counter_y_labels (field 7) in handleCounterSchema.
  • Extend unit tests to cover label parsing (both via fixture parsing and a direct schema payload test).
  • Update protobuf test fixture (test1.pb) to include a counter schema with labels.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
cmd/collectors/cmperf/cmmetrics/metrics.go Parses counter schema label fields 6/7 into LabelsX/LabelsY instead of erroring.
cmd/collectors/cmperf/cmmetrics/metrics_test.go Adds helper to build string fields and adds assertions/tests validating label parsing.
cmd/collectors/cmperf/cmmetrics/testdata/test1.pb Updates fixture data to include schema labels for validation in tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/collectors/cmperf/cmmetrics/metrics_test.go
@rahulguptajss rahulguptajss merged commit 941f192 into main Apr 23, 2026
17 checks passed
@rahulguptajss rahulguptajss deleted the cbg-pb branch April 23, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants