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

feat: introduce MR metrics #277

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Conversation

arththebird
Copy link
Contributor

@arththebird arththebird commented Jun 28, 2024

Description of your changes

Consume crossplane/crossplane-runtime#683 and configure metrics for Workspaces.

Heavily inspired by crossplane-contrib/provider-kubernetes#224 and crossplane-contrib/provider-upjet-aws#1281

Fixes #271

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

  1. Deploy the provider locally using make local-deploy
  2. Get the metrics from the provider pod (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="tf.upbound.io/v1beta1, Kind=Workspace"} 1
# 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="tf.upbound.io/v1beta1, Kind=Workspace"} 1
# 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="tf.upbound.io/v1beta1, Kind=Workspace"} 1

Signed-off-by: Arthur Loiselle <arthur.loiselle@dialogue.co>
Signed-off-by: Arthur Loiselle <arthur.loiselle@dialogue.co>
Copy link
Collaborator

@bobh66 bobh66 left a comment

Choose a reason for hiding this comment

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

LGTM - thanks!

@bobh66 bobh66 merged commit af199f8 into upbound:main Jul 2, 2024
9 checks passed
@arththebird arththebird deleted the feat/mr-metrics branch July 2, 2024 19:06
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.

Introduce High Level MR metrics
2 participants