Add new handler for metrics#3436
Conversation
|
Metrics output for Ansible and Helm sample operators correspondingly. # HELP primary_resource_created_at_seconds Timestamp at which a resource was created
# TYPE primary_resource_created_at_seconds gauge
primary_resource_created_at_seconds{group="cache.example.com",kind="Memcached",name="example-memcached",namespace="memcached",version="v1alpha1"} 1.594841815e+09# HELP primary_resource_created_at_seconds Timestamp at which a resource was created
# TYPE primary_resource_created_at_seconds gauge
primary_resource_created_at_seconds{group="cache.example.com",kind="Memcached",name="example-memcached",namespace="helm-memcached",version="v1alpha1"} 1.594843122e+09 |
joelanford
left a comment
There was a problem hiding this comment.
Looks great. Just a few minor nits.
|
We should probably document this metric somewhere in the helm and ansible docs as well. |
camilamacedo86
left a comment
There was a problem hiding this comment.
It shows great 🥇 Just a few nits.
|
On second thought, let's add the tests in a follow-up. I've got a few other PRs I want to submit that depend on this merging. |
@joelanford @camilamacedo86 |
*Added changelog fragment
4c061ad to
82e78f4
Compare
camilamacedo86
left a comment
There was a problem hiding this comment.
/lgtm
Since we agreed in do in a follow up the tests and docs improvements.
Great work 👍
Moving instrumented_enqueue_object from operator-sdk: operator-framework/operator-sdk#3436
Moving instrumented_enqueue_object from operator-sdk: operator-framework/operator-sdk#3436
Moving instrumented_enqueue_object from operator-sdk: operator-framework/operator-sdk#3436
Description: Add new handler for metrics which can be registered with controller-runtime registry, and wraps existing
EnqueueResuestForObject, for both Ansible and Helm controllers.Motivation: This PR addresses current complexity around exposing primary resource metrics in SDK.
/kind feature