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

Introduce MR metrics #224

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

ezgidemirel
Copy link
Contributor

@ezgidemirel ezgidemirel commented Apr 16, 2024

Description of your changes

This change consumes MR metric changes from crossplane-runtime and configures metrics.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Deployed the custom version to a cluster and get metrics

Ezgis-MacBook-Pro:phase-2 ezgidemirel$ curl -s http://localhost:8080/metrics |grep crossplane_
# HELP crossplane_managed_resource_exists The number of managed resources that exist
# TYPE crossplane_managed_resource_exists gauge
crossplane_managed_resource_exists{gvk="kubernetes.crossplane.io/v1alpha2, Kind=Object"} 60
# HELP crossplane_managed_resource_ready The number of managed resources in Ready=True state
# TYPE crossplane_managed_resource_ready gauge
crossplane_managed_resource_ready{gvk="kubernetes.crossplane.io/v1alpha2, Kind=Object"} 59
# HELP crossplane_managed_resource_synced The number of managed resources in Synced=True state
# TYPE crossplane_managed_resource_synced gauge
crossplane_managed_resource_synced{gvk="kubernetes.crossplane.io/v1alpha2, Kind=Object"} 59

Signed-off-by: ezgidemirel <[email protected]>
@ezgidemirel ezgidemirel marked this pull request as ready for review May 13, 2024 13:45
@lsviben
Copy link
Collaborator

lsviben commented May 14, 2024

Thanks @ezgidemirel ! LGTM, just have one question. Do we want to add a flag to enable/disable the metrics? How was this handled for other providers?

@ezgidemirel
Copy link
Contributor Author

Thanks @ezgidemirel ! LGTM, just have one question. Do we want to add a flag to enable/disable the metrics? How was this handled for other providers?

Thanks @lsviben for your review! Here is an example PR from provider-upjet-aws. We don't have any flags for the feature.

Copy link
Collaborator

@lsviben lsviben left a comment

Choose a reason for hiding this comment

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

🎉

@turkenh turkenh merged commit c56290b into crossplane-contrib:main May 20, 2024
7 checks passed
@ezgidemirel ezgidemirel deleted the introduce-metrics branch May 20, 2024 10:34
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