Skip to content

Introduce PrometheusMetricAssert and update metrics ITs for name compatibility#1

Open
SavitarC wants to merge 1 commit into
masterfrom
codex/fix-prometheus-metric-name-assertions
Open

Introduce PrometheusMetricAssert and update metrics ITs for name compatibility#1
SavitarC wants to merge 1 commit into
masterfrom
codex/fix-prometheus-metric-name-assertions

Conversation

@SavitarC
Copy link
Copy Markdown
Owner

Motivation

  • Ensure tests detect Prometheus metrics across legacy and new naming conventions by resolving compatible metric names and kinds.
  • Make integration tests more robust to cross-registry name changes (dots vs. snake_case and _total suffix behavior).

Description

  • Add PrometheusMetricAssert utility with MetricKind enum and logic to resolve legacy and new Prometheus-compatible names and to assert metric presence via assertDubboMetricExposed.
  • Replace plain metric string checks in ProviderMetricsIT and ConsumerMetricsIT with a MetricExpectation holder and helper methods addGauge/addCounter to record raw metric names and expected kinds.
  • Update test assertion loops to call PrometheusMetricAssert.assertDubboMetricExposed and log missing rawName and kind for clearer diagnostics.
  • Add comments clarifying when to use explicit kinds to preserve cross-registry compatibility.

Testing

  • Ran the modified integration tests ProviderMetricsIT and ConsumerMetricsIT, which exercise the /metrics scrape parsing and compatible-name assertions, and both tests passed.
  • Existing automated test execution completed without failures for the modified modules.

Codex Task

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