Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

feat: add metrics for counting objects indiviual by gvr and in total #22

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

akesser
Copy link
Collaborator

@akesser akesser commented Jan 19, 2024

This pull request adds a metric for each gvr to count the number of observed objects of this gvr and a metric to count the total number of observed objects.

E.g. if you cluster metrics includes GroupPolicyAttachment.iam.crossplane.io, the metric to count the objects looks like this:

# TYPE iam_aws_crossplane_io_GroupPolicyAttachment_v1beta1_resource_count gauge
# HELP iam_aws_crossplane_io_GroupPolicyAttachment_v1beta1_resource_count A metrics series objects to count objects of iam_aws_crossplane_io_GroupPolicyAttachment_v1beta1
iam_aws_crossplane_io_GroupPolicyAttachment_v1beta1_resource_count 1

The metric to count all objects looks like the following:

# TYPE x_metric_resources_count_total gauge
# HELP x_metric_resources_count_total A metric to count all resources
x_metric_resources_count_total 6

André Kesser added 3 commits January 19, 2024 20:48
Signed-off-by: André Kesser <andre.kesser@dkb.de>
Signed-off-by: André Kesser <andre.kesser@dkb.de>
Signed-off-by: André Kesser <andre.kesser@dkb.de>
@akesser akesser marked this pull request as ready for review January 22, 2024 14:56
Signed-off-by: André Kesser <andre.kesser@dkb.de>
Copy link
Member

@haarchri haarchri left a comment

Choose a reason for hiding this comment

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

tested the implementation - thanks for this - LGTM

@haarchri
Copy link
Member

@akesser please bump the versions in Chart.yaml and values.yaml

Signed-off-by: André Kesser <andre.kesser@dkb.de>
@akesser akesser merged commit 81ba827 into crossplane-contrib:main Jan 22, 2024
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants