Skip to content

Conversation

@shanaya-Gupta
Copy link

Fix for Issue #7617

Issue: [ci]: Metrics comparison is flaky

Changes:

  • Modified: examples/hotrod/pkg/tracing/rpcmetrics/normalizer.go, examples/hotrod/pkg/tracing/rpcmetrics/normalizer_test.go

Please review carefully before merging.

@shanaya-Gupta shanaya-Gupta requested a review from a team as a code owner October 25, 2025 00:52
@dosubot dosubot bot added the bug label Oct 25, 2025
metricFamilies := []*io_prometheus_client.MetricFamily{mfWithNamespace, mfWithoutNamespace}

// Act: Call the normalization function.
normalizedFamilies := NormalizeMetricFamiliesForE2E(metricFamilies)
Copy link
Contributor

Choose a reason for hiding this comment

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

Function name mismatch: The test calls NormalizeMetricFamiliesForE2E (plural "Families") but the actual function is named NormalizeMetricFamilyForE2E (singular "Family"). This will cause a compilation error.

// Fix: Change to match the actual function name
NormalizeMetricFamilyForE2E(metricFamilies)
Suggested change
normalizedFamilies := NormalizeMetricFamiliesForE2E(metricFamilies)
normalizedFamilies := NormalizeMetricFamilyForE2E(metricFamilies)

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

assert.Equal(t, 123.0, *metric1.Counter.Value, "Counter value should be unchanged")
expectedLabels1 := map[string]string{
"service": "driver",
"namespace": E2EStableNamespace,
Copy link
Contributor

Choose a reason for hiding this comment

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

Constant name mismatch: The test references E2EStableNamespace (exported, capitalized) but the constant defined in normalizer.go is e2eStableNamespace (unexported, lowercase). This will cause a compilation error.

// Fix: Either use the correct constant name or export it
"namespace": "e2e-namespace-stable", // Use the string literal directly
// OR export the constant in normalizer.go as E2EStableNamespace

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant