open-feature / js-sdk

JavaScript SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
170 stars 31 forks source link

[FEATURE] web-sdk: Access to provider status inside the provider #893

Open thomaspoignant opened 7 months ago

thomaspoignant commented 7 months ago

Requirements

With the web-sdk v1.0.0, the provider status is now managed directly by the SDK which is great, but there are some usecases when it will be interesting to have access to the provider status inside the SDK.

One of the use cases I have is being able to send a CACHED reason when the provider is STALE.

weyert commented 7 months ago

Totally agree with this, probably worth doing a spec update for this?

thomaspoignant commented 7 months ago

Totally agree with this, probably worth doing a spec update for this?

Not sure what the others think but it could be a great idea to spec it.

toddbaert commented 7 months ago

You mean read-only access, I guess based on your use-case? I think I could be convinced of that. :thinking:

thomaspoignant commented 7 months ago

You mean read-only access, I guess based on your use-case? I think I could be convinced of that. 🤔

Yes read-only, I don't need to change the status but I need to have access to it.

beeme1mr commented 7 months ago

It might be slightly complicated to get the status due to domains. Perhaps we should quickly prototype it to see how it could be implemented and then used in a provider.