Skip to content

Conversation

cappyzawa
Copy link
Member

Resolves #856

Summary

Add count metrics for canary successes and failures with deployment strategy and analysis status labels.

Changes

  • Add flagger_canary_successes_total and flagger_canary_failures_total counter metrics
  • Refactor deployment strategy detection logic to domain layer
  • Add comprehensive metrics state transition tests
  • Update deployment strategy constants to use hyphen format (blue-green, ab-testing)

Test Results

After running test/kubernetes/run.sh and executing curl -s http://localhost:8080/metrics, confirmed metrics are properly recorded:

flagger_canary_successes_total{analysis_status="completed",deployment_strategy="blue-green",name="podinfo",namespace="test"} 1

Enhance existing scheduler tests for deployments, daemonsets, and
services by adding prometheus metrics verification using testutil.
This ensures that status metrics are correctly recorded during
canary promotion workflows and provides better test coverage for
the metrics recording functionality.

Signed-off-by: cappyzawa <[email protected]>
@cappyzawa cappyzawa marked this pull request as ready for review July 8, 2025 16:44
Implement flagger_canary_successes_total and flagger_canary_failures_total
counter metrics with deployment strategy detection and analysis status
tracking for better observability of canary deployment outcomes.

Signed-off-by: cappyzawa <[email protected]>
@cappyzawa cappyzawa force-pushed the issue-856-count-metrics branch from 98c2932 to 21c44a8 Compare July 8, 2025 16:46
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.

Count metrics for canary releases
1 participant