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

Enhanced Client doesn't return consumed capacity in all operations #3744

Closed
2 tasks
Sathyvs opened this issue Feb 3, 2023 · 4 comments
Closed
2 tasks

Enhanced Client doesn't return consumed capacity in all operations #3744

Sathyvs opened this issue Feb 3, 2023 · 4 comments
Assignees
Labels
closed-for-staleness dynamodb-enhanced feature-request A feature should be added or improved. p3 This is a minor priority issue

Comments

@Sathyvs
Copy link

Sathyvs commented Feb 3, 2023

Describe the feature

Enhanced Client has only Update and Put operation with Response that returns Consumer capacity, there is nothing for read or query operations, how to get the consumed capacity for every operation ?
Also is there a way to configure cloudwatch metrics and have the consumed capacity directly published to cloud watch for all the operations ?

Use Case

This data can really help to understand where the dynamo db is not properly used and improve the performance and also make possible data model changes to effectively use the database and increase the application performance

Proposed Solution

Every operation in the high level api has methods to return the consumed capacity units
Ability to publish the same as a metric to cloud watch automatically for every DB operation

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.19.30

JDK version used

11

Operating System and version

aws lambda x86_64

@Sathyvs Sathyvs added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 3, 2023
@debora-ito debora-ito added the needs-review This issue or PR needs review from the team. label Feb 6, 2023
@debora-ito
Copy link
Member

Hi @Sathyvs we've added to the backlog the task to return consumedCapacity on the high-level query and scan operations. The solution will probably be the same of putItem and updateItem, we'll introduce new methods like scanWithResponse.

Regarding publishing consumedCapacity to CloudWatch metrics, check the CloudWatchMetricPublisher javadoc to see how you can publish custom metrics -
https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/metrics/publishers/cloudwatch/CloudWatchMetricPublisher.html

@debora-ito debora-ito removed needs-triage This issue or PR still needs to be triaged. needs-review This issue or PR needs review from the team. labels Feb 6, 2023
@Sathyvs
Copy link
Author

Sathyvs commented Feb 7, 2023

Thanks for the reply Debora, do we know when it will be available ?

@debora-ito
Copy link
Member

We don't have a timeline to share.

@debora-ito
Copy link
Member

Enhanced Client GetItem (since 2.20.146) and Query (since 2.20.153) now support ConsumedCapacity.

Will mark this issue to auto close soon. Let us know if you have any further questions.

@debora-ito debora-ito added the closing-soon This issue will close in 4 days unless further comments are made. label Sep 27, 2023
@debora-ito debora-ito self-assigned this Sep 27, 2023
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will close in 4 days unless further comments are made. labels Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness dynamodb-enhanced feature-request A feature should be added or improved. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

2 participants