Skip to content

feat: rework metrics, add matching/conflict visibility#488

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:metrics
Jul 14, 2026
Merged

feat: rework metrics, add matching/conflict visibility#488
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:metrics

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

Metrics (all projectsveltos_ prefixed):

  • reconcile_duration_seconds (histogram): cluster_type, cluster_namespace, cluster_name. Duration of programming a Classifier on a workload cluster.
  • reconcile_outcome_total (counter): cluster_type, cluster_namespace, cluster_name, status, classifier_name. Terminal Provisioned/Failed outcomes only.
  • reconcile_last_success_timestamp_seconds (gauge): same labels minus status. Unix timestamp of the last Provisioned outcome.
  • matching_clusters (gauge): classifier_name. Clusters currently matching a Classifier's rules.
  • label_conflicts (gauge): classifier_name. Clusters where this Classifier currently has at least one label key it can't manage because another Classifier already owns it.
  • mgmt_cluster_matching_clusters / mgmt_cluster_label_conflicts (gauges): classifier_name. Same concepts as above, kept as separate metrics for ManagementClusterClassifier since it's a distinct CRD/reconciler with its own matching semantics (Lua evaluated against management-cluster resources, no deploy-status state machine to hook a duration/outcome metric into).

Also:

  • Enable auth-proxy RBAC resources
  • Add manifest/service_monitor.yaml

Metrics (all `projectsveltos_` prefixed):
- **reconcile_duration_seconds** (histogram): cluster_type, cluster_namespace, cluster_name.
Duration of programming a Classifier on a workload cluster.
- **reconcile_outcome_total** (counter): cluster_type, cluster_namespace, cluster_name, status, classifier_name.
Terminal Provisioned/Failed outcomes only.
- **reconcile_last_success_timestamp_seconds** (gauge): same labels minus status. Unix timestamp of the last Provisioned outcome.
- **matching_clusters** (gauge): classifier_name. Clusters currently matching a Classifier's rules.
- **label_conflicts** (gauge): classifier_name. Clusters where this Classifier currently has at least one label key it can't
manage because another Classifier already owns it.
- **mgmt_cluster_matching_clusters** / **mgmt_cluster_label_conflicts** (gauges): classifier_name. Same concepts as above, kept
as separate metrics for ManagementClusterClassifier since it's a distinct CRD/reconciler with its own matching semantics
(Lua evaluated against management-cluster resources, no deploy-status state machine to hook a duration/outcome metric into).

Also:
- Enable auth-proxy RBAC resources
- Add manifest/service_monitor.yaml
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@gianlucam76 gianlucam76 merged commit da509cb into projectsveltos:main Jul 14, 2026
9 checks passed
@gianlucam76 gianlucam76 deleted the metrics branch July 14, 2026 14:53
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.

2 participants