102 lines
4.5 KiB
YAML
102 lines
4.5 KiB
YAML
groups:
|
|
- id: registry.feature_flag
|
|
type: attribute_group
|
|
stability: development
|
|
display_name: Feature Flag Attributes
|
|
brief: >
|
|
This document defines attributes for Feature Flags.
|
|
attributes:
|
|
- id: feature_flag.key
|
|
type: string
|
|
stability: development
|
|
brief: The lookup key of the feature flag.
|
|
examples: ["logo-color"]
|
|
- id: feature_flag.provider.name
|
|
type: string
|
|
stability: development
|
|
brief: Identifies the feature flag provider.
|
|
examples: ["Flag Manager"]
|
|
- id: feature_flag.result.variant
|
|
type: string
|
|
stability: development
|
|
examples: ["red", "true", "on"]
|
|
brief: >
|
|
A semantic identifier for an evaluated flag value.
|
|
note: |-
|
|
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 `#c05543`.
|
|
- id: feature_flag.context.id
|
|
type: string
|
|
stability: development
|
|
examples: ["5157782b-2203-4c80-a857-dbbd5e7761db"]
|
|
brief: >
|
|
The unique identifier for the flag evaluation context. For example, the targeting key.
|
|
- id: feature_flag.version
|
|
type: string
|
|
stability: development
|
|
examples: ["1", "01ABCDEF"]
|
|
brief: >
|
|
The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset.
|
|
- id: feature_flag.set.id
|
|
type: string
|
|
stability: development
|
|
examples: ["proj-1", "ab98sgs", "service1/dev"]
|
|
brief: >
|
|
The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs.
|
|
- id: feature_flag.result.reason
|
|
type:
|
|
members:
|
|
- id: static
|
|
value: "static"
|
|
brief: The resolved value is static (no dynamic evaluation).
|
|
stability: development
|
|
- id: default
|
|
value: "default"
|
|
brief: The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic evaluation yielded no result).
|
|
stability: development
|
|
- id: targeting_match
|
|
value: "targeting_match"
|
|
brief: The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting.
|
|
stability: development
|
|
- id: split
|
|
value: "split"
|
|
brief: The resolved value was the result of pseudorandom assignment.
|
|
stability: development
|
|
- id: cached
|
|
value: "cached"
|
|
brief: The resolved value was retrieved from cache.
|
|
stability: development
|
|
- id: disabled
|
|
value: "disabled"
|
|
brief: The resolved value was the result of the flag being disabled in the management system.
|
|
stability: development
|
|
- id: unknown
|
|
value: "unknown"
|
|
brief: The reason for the resolved value could not be determined.
|
|
stability: development
|
|
- id: stale
|
|
value: "stale"
|
|
brief: The resolved value is non-authoritative or possibly out of date
|
|
stability: development
|
|
- id: error
|
|
value: "error"
|
|
brief: The resolved value was the result of an error.
|
|
stability: development
|
|
stability: development
|
|
examples: ["static", "targeting_match", "error", "default"]
|
|
brief: >
|
|
The reason code which shows how a feature flag value was determined.
|
|
- id: feature_flag.result.value
|
|
type: any
|
|
stability: development
|
|
examples: ["#ff0000", true, 3]
|
|
brief: The evaluated value of the feature flag.
|
|
note: |
|
|
With some feature flag providers, feature flag results can be quite large or contain private or sensitive details.
|
|
Because of this, `feature_flag.result.variant` is often the preferred attribute if it is available.
|
|
|
|
It may be desirable to redact or otherwise limit the size and scope of `feature_flag.result.value` if possible.
|
|
Because the evaluated flag value is unstructured and may be any type, it is left to the instrumentation author to determine how best to achieve this.
|