Skip to content
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

high resolution metrics #22

Merged
merged 1 commit into from
Jun 13, 2019
Merged

Conversation

jebl01
Copy link
Contributor

@jebl01 jebl01 commented Jun 5, 2019

Provides the possibility to report metrics to AWS using high resolution

@@ -339,6 +341,7 @@ private void stageMetricDatum(final boolean metricConfigured,
.withValue(cleanMetricValue(metricValue))
.withMetricName(metricName)
.withDimensions(dimensions)
.withStorageResolution(highResolution ? 1 : 60)
Copy link
Owner

Choose a reason for hiding this comment

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

What do 1 & 60 mean here? Could you extract them into constants?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess they mean something like "one second resolution" or "sixty seconds/one minute resolution"... AWS doesn't give much away;

The PutMetricData function now accepts an optional StorageResolution parameter. Set this parameter to 1 to publish high-resolution metrics; omit it (or set it to 60) to publish at standard 1-minute resolution.

Since this is CloudWatchReporter internals, I thought that abstracting them using Builder.withHighResolution() would be enough :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok - got rid of the secret numbers

@jebl01
Copy link
Contributor Author

jebl01 commented Jun 13, 2019

ping

@azagniotov
Copy link
Owner

@jebl01 thanks, sorry - real life busy

@azagniotov azagniotov merged commit 3600dee into azagniotov:master Jun 13, 2019
@azagniotov
Copy link
Owner

Will release today!

@azagniotov
Copy link
Owner

@jebl01 I released the new version the contain your changes. Thanks for your help. Please allow a few hours for the release to go live on Maven Central

@jebl01 jebl01 deleted the high-resolution branch June 14, 2019 06:52
@jebl01
Copy link
Contributor Author

jebl01 commented Jun 14, 2019

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants