Semantic Conventions for Feature Flag Evaluations
This document defines semantic conventions for recording feature flag evaluations as a log record emitted through the Logger API. This is useful when a flag is evaluated outside of a transaction context such as when the application loads or on a timer. To record a flag evaluation as a part of a transaction context, consider recording it as a span event.
For more information about why it is useful to capture feature flag evaluations, refer to the motivation section of the trace semantic convention for feature flag evaluations.
Recording an Evaluation
The table below indicates which attributes should be added to the LogRecord and their types.
The event name MUST be
|string||The unique identifier of the feature flag.||Required|
|string||The name of the service provider that performs the flag evaluation.||Recommended|
|string||SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. ||Recommended|
: A semantic identifier, commonly referred to as a variant, provides a means
for referring to a value without including the value itself. This can
provide additional context for understanding the meaning behind a value.
For example, the variant
red maybe be used for the value
A stringified version of the value can be used in situations where a semantic identifier is unavailable. String representation of the value should be determined by the implementer.