Skip to content

Introduce MR metrics#224

Merged
turkenh merged 1 commit intocrossplane-contrib:mainfrom
ezgidemirel:introduce-metrics
May 20, 2024
Merged

Introduce MR metrics#224
turkenh merged 1 commit intocrossplane-contrib:mainfrom
ezgidemirel:introduce-metrics

Conversation

@ezgidemirel
Copy link
Copy Markdown
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

@ezgidemirel ezgidemirel force-pushed the introduce-metrics branch 3 times, most recently from 55a15d7 to 76934b5 Compare April 18, 2024 11:30
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
@ezgidemirel ezgidemirel marked this pull request as ready for review May 13, 2024 13:45
@lsviben
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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