-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(dynamodb): Misconfigured metrics causing empty graphs #11283
Conversation
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.
Generally, I think we need to do a "deprecate + create new methods" pattern here, over breaking changes to a stable module. There are users for whom the API wasn't broken, who will hit compilation issues when updating to this solution.
That's likely going to lead to some awkward method naming, but I don't see how we get around that otherwise.
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.
Looks good to me. A buncha nit-picky stuff. Needs to be marked as ready for review + merge from master so you can fix the build failures.
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.
Some things to think about for your consideration. Won't block the PR on it, but do be sure you're satisfied with your own choices before merging :).
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This PR corrects 3 misconfigured metrics we had on the
Table
construct.UserErrors
Per the documentation The
table.metricUserErrors()
does not emit theTableName
dimension. It is actually an account (and region) wide metric.The fix was to just validate that no dimensions are passed to this operation.
SystemErrors
Per the documentation The
table.metricSystemErrors()
is always emitted with theOperation
dimension, and our current implementation does not pass it.The fix adds an additional
operations
property to the method, that allows passing an array of operations, the returned metric will be a SUM over those operations. If no operation is passed, we sum all available operations.Since the current method returns a
Metric
, returning a math expression won't work since it is anIMetric
that doesn't extendMetric
. To avoid breaking changes, we introduce a new method,metricSystemErrorsForOperations
:SuccessfulRequestLatency
Per the documentation The
table.metricSuccessfulRequestLatency()
is always emitted with theOperation
dimension, and our current implementation does not pass it.The fix requires user to pass the
Operation
dimension.So the API is:
Fixes #11261
Fixes #11269
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license