open-feature / spec

OpenFeature specification
https://openfeature.dev
Apache License 2.0
612 stars 35 forks source link

Events Specification #77

Closed beeme1mr closed 1 year ago

beeme1mr commented 2 years ago

Summary

Many vendors support an event-based API that allows developers to subscribe for events. This can be used to detect when the SDK is ready to perform flag evaluation or a flag configuration changes.

Events

The following events should be considered defining the spec.

Name Description
PROVIDER_STATUS Provider status would emit events around the lifecycle of a provider. This could include events like "ready". This could be used to ensure that the provider has started and is ready to perform flag evaluation.
FLAG_CONFIG_UPDATE Flag config update would emit events when a flag configuration changes. This could be used to detect that a flag configuration has changed and instantiate a new object.

References

InTheCloudDan commented 2 years ago

for LaunchDarkly we have it a bit deeper than just FLAG_CONFIG_UPDATE. You can pass in a context that when the update(rule changes) affects the return valuation for that specific context then the event is emitted.

agentgonzo commented 2 years ago

CloudBees also has a ConfigurationFetchedHandler that can notify the client when flag configurations are changed in the dashboard.

agentgonzo commented 2 years ago

https://github.com/open-feature/java-sdk/pull/30 for an idea on implementing it.

toddbaert commented 1 year ago

I'm going to close this since we have an OFEP that's a better platform for concrete discussion.