kentcb / azure_application_insights

Dart client for Azure's Application Insights service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retry Mechanism - Local storage for out of connectivity scenarios

Leonardo-Ferreira opened this issue · comments

I was wondering if we could add a local storage for telemetry... basically, we should try to send the telemetry, and if it fails, we should store it in a local storage and later retry...

Please see #21

ok thanks @kentcb!

although possible, I was wondering if the package COULD do it OOO, encapsulating the "retry" policy logic and creating a layer of abstraction... if you find it indeed possible, I could muster some help and implement it...

also, a pointer like "well, the best place for this would be in the class X, where in line 123 you would need to check if the error returned from the api is of temporary nature and if so store the telemetry"

@Leonardo-Ferreira I appreciate and understand what you're asking, but I consider it out of scope for this library. It's not something I want to have to maintain moving forwards, nor does it feel like the right place for it (since it's more of a cross-cutting concern). I actually suspect there are likely pubs out there already that do this more-or-less out of the box, but haven't had time. I'd be more than happy to point people to those in the README if you identify one or two that work well.

Hope you can understand this thinking.