Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated object metrics #1686

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Remove deprecated object metrics #1686

merged 1 commit into from
Dec 11, 2024

Conversation

hasithsen
Copy link
Contributor

@hasithsen hasithsen commented Dec 8, 2024

Suspend and readiness metrics recording removed from GitRepository, Bucket, HelmRepository, HelmChart and OCIRepository reconcilers.

Refer fluxcd/flux2#5083.

Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

Thanks for working on this.

For verification, the following metrics were exported before:

# HELP gotk_reconcile_condition The current condition status of a GitOps Toolkit resource reconciliation.
# TYPE gotk_reconcile_condition gauge
gotk_reconcile_condition{kind="GitRepository",name="podinfo",namespace="default",status="False",type="Ready"} 0
gotk_reconcile_condition{kind="GitRepository",name="podinfo",namespace="default",status="True",type="Ready"} 1
gotk_reconcile_condition{kind="GitRepository",name="podinfo",namespace="default",status="Unknown",type="Ready"} 0
# HELP gotk_reconcile_duration_seconds The duration in seconds of a GitOps Toolkit resource reconciliation.
# TYPE gotk_reconcile_duration_seconds histogram
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.01"} 0
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.038363583488692544"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.1471764538093883"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.5646216173286169"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="2.166090855590701"} 2
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="8.309900738254731"} 2
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="31.879757075478317"} 2
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="122.30217221643493"} 2
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="469.19495946736544"} 2
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="1799.9999999999986"} 2
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="+Inf"} 2
gotk_reconcile_duration_seconds_sum{kind="GitRepository",name="podinfo",namespace="default"} 1.527162905
gotk_reconcile_duration_seconds_count{kind="GitRepository",name="podinfo",namespace="default"} 2
# HELP gotk_suspend_status The current suspend status of a GitOps Toolkit resource.
# TYPE gotk_suspend_status gauge
gotk_suspend_status{kind="GitRepository",name="podinfo",namespace="default"} 0

With this change, only the duration metrics are exported

# HELP gotk_reconcile_duration_seconds The duration in seconds of a GitOps Toolkit resource reconciliation.
# TYPE gotk_reconcile_duration_seconds histogram
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.01"} 0
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.038363583488692544"} 0
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.1471764538093883"} 0
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="0.5646216173286169"} 0
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="2.166090855590701"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="8.309900738254731"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="31.879757075478317"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="122.30217221643493"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="469.19495946736544"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="1799.9999999999986"} 1
gotk_reconcile_duration_seconds_bucket{kind="GitRepository",name="podinfo",namespace="default",le="+Inf"} 1
gotk_reconcile_duration_seconds_sum{kind="GitRepository",name="podinfo",namespace="default"} 0.737681252
gotk_reconcile_duration_seconds_count{kind="GitRepository",name="podinfo",namespace="default"} 1

LGTM!

@darkowlzz
Copy link
Contributor

darkowlzz commented Dec 11, 2024

@hasithsen it would be nice to rebase to have just one commit here before we merge it, removing the merge branch commit.
Do it if you can. Otherwise, I'll rebase it myself before merge.

@darkowlzz darkowlzz changed the title feat: Remove deprecated object metrics from controllers fluxcd/flux2#5083 Remove deprecated object metrics Dec 11, 2024
@stefanprodan stefanprodan merged commit b392cdc into fluxcd:main Dec 11, 2024
9 checks passed
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.

3 participants