Closed auiii24 closed 8 months ago
Hello, @auiii24 and thanks for opening this issue. Are you looking to confirm if that code snippet you provided will work as a way to get callback confirmations/errors from Kinesis? And are you only looking to have some type of customer logic implemented depending on success/error (rather than just the resolve/reject in the existing promise)?
Hello, @cwomack
Are you looking to confirm if that code snippet you provided will work as a way to get callback confirmations/errors from Kinesis?
And are you only looking to have some type of customer logic implemented depending on success/error (rather than just the resolve/reject in the existing promise)?
Related #12221
@auiii24, we've created a docs issue to provide clarity about the synchronous nature of Analytics.record()
API that's the subject both this issue and the related #12221.
While the documentation does not specify that you should await this function, we consider the Analytics.record()
API to be one that should be synchronous and not "block" our customer's applications. Since you're on v5.X at this time, please follow the recommendations within the documentation (which we'll improve) and treat the function as synchronous. It should work as a "fire and forget" model.
With the docs issue opened to track this, I'll close this issue. Thank you for creating this issue to help us make a needed improvement in our documentation!
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Analytics
Environment information
Describe the bug
We are working on @aws-amplify/analytics with the AWSKinesis provider, and I would like to know how we can handle callback after analytic sends record success or failure. We need to know the process before entering the next step, such as sending log security to AWS after that, we will process the new step to show some UI to the user.
Expected behavior
We would like to handle callback after sending records to analytic by AWSKinesis.
Reproduction steps
N/A
Code Snippet