-
Notifications
You must be signed in to change notification settings - Fork 961
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
Support of high resolution metrics for CloudWatch #2088
Comments
@COGNITIFF I believe it is already possible by configuring |
I assumed so too, but "step" only affects the push frequency. Even if data is pushed to AWS at a higher rate, CloudWatch, by default, still rolls it up to 1-minute increments. Enabling more granular storage and analysis requires additionally setting StorageResolution to a lower value, which activates what AWS calls "high-resolution metrics" (comes at a cost, by the way). |
@COGNITIFF Thanks for the explanation. I see now that there is a @Nullable
private MetricDatum metricDatum(Meter.Id id, @Nullable String suffix, StandardUnit standardUnit, double value) {
if (Double.isNaN(value)) {
return null;
}
List<Tag> tags = id.getConventionTags(config().namingConvention());
return MetricDatum.builder()
.storageResolution(1) // or 60
.metricName(getMetricName(id, suffix))
.dimensions(toDimensions(tags))
.timestamp(timestamp)
.value(CloudWatchUtils.clampMetricValue(value))
.unit(standardUnit)
.build();
} So this is tricky, being a per-metric decision. Do you want all of your metrics high resolution or just some subset? |
I think a registry-scoped setting would suffice, especially since "step" is also registry scoped, and they are interrelated. |
@COGNITIFF Do you suppose that if |
It would reduce configuration effort, but I can think of use-cases where users (especially for cost-saving reasons) would be ok with more granular data being rolled-up and reported by CloudWatch at 1-minute intervals. Keeping the two settings separate would allow for more flexibility. |
@COGNITIFF Thanks. We do have a config complexity/flexibility tradeoff to evaluate. I was thinking that maybe we stick with your original suggestion to do this on a per-registry basis for now. Added a note about how a user could only send some metrics at high resolution by using deny filters and two This config option allows you to override the "if step <1 minute do high resolution" thing, btw. |
That's a great solution, and I think it will address most scenarios! Thanks! |
At the moment, the CloudWatch implementation publishes MetricDatum with the default StorageResolution of 1 minute. It would be great to be able to configure the resolution. There are use cases where 1 minute is too coarse, for example, when monitoring internal queues. CloudWatch supports storage resolutions of down to 1 second.
The text was updated successfully, but these errors were encountered: