-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add an option to send histograms/summary counts as monotonic counters #4629
Conversation
Codecov Report
|
27345ce
to
ba598fe
Compare
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.
Using monotonic counts for counters is more appropriate is most cases
Is using a flag like send_counts_as_monotonic
an issue if we want only some of the metrics to be send as monotonic counts
?
As you said above, it might be appropriate for most cases, but maybe not all cases.
Would it be more appropriate to provide a way to supply a specific type for each metric ? Example:
def __init__(self, name, init_config, agentConfig, instances=None):
super(CrioCheck, self).__init__(
...
default_instances={
"crio": {
...
'metrics': [
{'container_runtime_crio_operations1': ('operations.count', GAUGE)},
{'container_runtime_crio_operations2': ('operations.count', COUNT)},
{'container_runtime_crio_operations_latency_microseconds': ('operations.latency', MONOTONIC_COUNT)},
],
...
}
},
)
@AlexandreYang actually there's already a setting for this called This change is only for the counters inside summary/histograms metrics. |
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.
Oh, right. Thx for the explanation.
So there is no case, where you might want to send some distribution counts as count
and some other as monotonic count
?
@@ -172,6 +172,10 @@ def create_scraper_configuration(self, instance=None): | |||
instance.get('send_monotonic_counter', default_instance.get('send_monotonic_counter', True)) | |||
) | |||
|
|||
config['send_counts_as_monotonic'] = is_affirmative( |
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.
Since that's quite specific to distribution metrics. Should the name be a bit more precise like: send_distribution_counts_as_monotonic
?
Otherwise, this might be confused with sending all counts as monotonic.
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.
LGTM. Maybe be nice to have a review from @DataDog/container-integrations too.
58da7a4
to
a751e78
Compare
a751e78
to
a48a3c1
Compare
What does this PR do?
Add an option to send histograms & summaries counts as
monotonic_counter
Motivation
Using monotonic counts for counters is more appropriate is most cases
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached