Is it possible to add metadata to flags definitions? #1429
Replies: 1 comment 4 replies
-
Hey @apodgorbunschih, sorry for the delayed response! I guess the notification from GitHub got buried in my email. I was actually working on something related to this today. OpenFeature is working with OpenTelemetry on defining the semantics for feature flag observiblity. A draft PR open includes new metadata like a flag set ID, context ID, etc. For OpenFeature to adhere to this change, we'll need to access this information, and providers like flagd must be able to send it. I believe the flagd flag configuration will likely need to be extended to include metadata as a top-level option, and for each flag. An example may look like this:
Within the provider, the top level metadata could be stored as provider metadata and the flag level metadata could be returned as flag metadata. The reason I think it's important to use provider metadata is to reduce duplication and because provider metadata is available to all stages of a hook, where as flag metadata is only available in the after hook. Do you think this would work for your use case? |
Beta Was this translation helpful? Give feedback.
-
Hello people 👋
I would like to have some metadata returned with
flag
evaluation that is described in OpenFeature Specs: https://openfeature.dev/specification/types/#evaluation-details. I would like to return in themetadata
things like "version" of the flag, "team" that is owning this flag. This data I will use for observability purposes on the JAVA/PHP SDK on the client side.From the flagd implementation I see that the only
metadata
returned as the result of flag evaluation is thescope
, and this is not set perflag
but per "source".ex: of the flags.json
in the flagd code I would like something like that
core/pkg/evaluator/json.go:312
If something like that make sense, I could try to contribute. Thanks in advance 🙇
Beta Was this translation helpful? Give feedback.
All reactions