-
Notifications
You must be signed in to change notification settings - Fork 9
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
GH-34 emmit write counter as a metric #74
Conversation
70a865b
to
25f09fb
Compare
@@ -336,8 +339,16 @@ func (r *DNSRecordReconciler) applyChanges(ctx context.Context, dnsRecord *v1alp | |||
// generation has not changed but there are changes. | |||
// implies that they were overridden - bump write counter | |||
if !generationChanged(dnsRecord) { | |||
dnsRecord.Status.WriteCounter++ | |||
logger.V(3).Info("Changes needed on the same generation of record") | |||
if dnsRecord.Status.WriteCounter < WriteCounterLimit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we set any dimension on this metric? Seems like we should set the the dnsRecord name and namespace as labels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I read it we will increment this for all dns records so only ever 20 writes or am I mistaken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, only 20 writes per generation of DNS record (frankly, if we have more than 2 writes per gen something is wrong with the DNS provider or, more accurately, something keeps overriding changes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the metric is not unique per dnsrecord?
|
Emmiting write counter as a metric and setting an upper limit for the counter after witch we give up