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

Improve ClientIntent status & event reporting robustness by using LRU cache & caching only after successful report #484

Merged

Conversation

amitlicht
Copy link
Contributor

Description

This PR improves the robustness of reporting ClientIntent status & events, by adding two improvements:

  • Cache events & status only after successfully reporting them to Otterize Cloud, so that in case of reporting errors, the reporting will be retried on the next reporting interval.
  • Use an expirable LRU cache, with an expiry of 1 hour. This way even in case the Cloud somehow missed the report, it will be retried in 1 hour (assuming the status & events will still be there).

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR and in github.com/otterize/docs

@amitlicht amitlicht merged commit 8d05373 into main Sep 12, 2024
20 checks passed
@amitlicht amitlicht deleted the amitlicht/intent_status_and_events_caching_after_errors branch September 12, 2024 12:01
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2024
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants