launchdarkly / rust-server-sdk

LaunchDarkly Server-Side SDK for Rust
https://docs.launchdarkly.com/sdk/server-side/rust
Other
18 stars 13 forks source link

Expose connection state to client consumers #29

Open aalexandrov opened 1 year ago

aalexandrov commented 1 year ago

Is your feature request related to a problem? Please describe.

At Materialize, we plan to use LaunchDarkly in continuously running processes and would like to have an internal metric indicating a state where the client instance temporary could not communicate with the LaunchDarkly service.

Describe the solution you'd like

Some method on the client instance that returns a bool or an enum indicates whether the client is connected and the connection is alive.

Describe alternatives you've considered Periodically polling LaunchDarkly API in a separate process / Tokio task.

Additional context

As a cloud service that is meant to be used in critical business applications, it is important to have good visibility for all our external dependencies.

keelerm84 commented 1 year ago

Thank you for filing this feature request. We have an internal ticket (sc-142483) tracking support for this feature. We will update this issue when the feature has been released.

benesch commented 1 year ago

Thanks! @aalexandrov, correct me if I'm wrong, but I think even better than a bool would be the time of the last successful synchronization, or the last successful connection heartbeat—whatever makes sense given the design of the internals of the library.

aalexandrov commented 1 year ago

@benesch yes a timestamp would be better.