Rename `evaluation` to `result` for feature flag evaluation result attributes (#1989)
This commit is contained in:
parent
219c3d909e
commit
14e6df9433
|
|
@ -0,0 +1,22 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
#
|
||||
# If your change doesn't affect end users you should instead start
|
||||
# your pull request title with [chore] or use the "Skip Changelog" label.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: breaking
|
||||
|
||||
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
|
||||
component: feature_flag
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: Rename `evaluation` to `result` for feature flag evaluation result attributes
|
||||
|
||||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
|
||||
# The values here must be integers.
|
||||
issues: [1989]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext:
|
||||
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
# Feature flag
|
||||
|
||||
- [Feature Flag Attributes](#feature-flag-attributes)
|
||||
- [Deprecated Feature Flag Attributes](#deprecated-feature-flag-attributes)
|
||||
|
||||
## Feature Flag Attributes
|
||||
|
||||
This document defines attributes for Feature Flags.
|
||||
|
|
@ -11,20 +14,45 @@ This document defines attributes for Feature Flags.
|
|||
|---|---|---|---|---|
|
||||
| <a id="feature-flag-context-id" href="#feature-flag-context-id">`feature_flag.context.id`</a> | string | The unique identifier for the flag evaluation context. For example, the targeting key. | `5157782b-2203-4c80-a857-dbbd5e7761db` |  |
|
||||
| <a id="feature-flag-evaluation-error-message" href="#feature-flag-evaluation-error-message">`feature_flag.evaluation.error.message`</a> | string | A message explaining the nature of an error occurring during flag evaluation. | `Flag `header-color` expected type `string` but found type `number`` |  |
|
||||
| <a id="feature-flag-evaluation-reason" href="#feature-flag-evaluation-reason">`feature_flag.evaluation.reason`</a> | string | The reason code which shows how a feature flag value was determined. | `static`; `targeting_match`; `error`; `default` |  |
|
||||
| <a id="feature-flag-key" href="#feature-flag-key">`feature_flag.key`</a> | string | The lookup key of the feature flag. | `logo-color` |  |
|
||||
| <a id="feature-flag-provider-name" href="#feature-flag-provider-name">`feature_flag.provider_name`</a> | string | Identifies the feature flag provider. | `Flag Manager` |  |
|
||||
| <a id="feature-flag-result-reason" href="#feature-flag-result-reason">`feature_flag.result.reason`</a> | string | The reason code which shows how a feature flag value was determined. | `static`; `targeting_match`; `error`; `default` |  |
|
||||
| <a id="feature-flag-result-variant" href="#feature-flag-result-variant">`feature_flag.result.variant`</a> | string | A semantic identifier for an evaluated flag value. [1] | `red`; `true`; `on` |  |
|
||||
| <a id="feature-flag-set-id" href="#feature-flag-set-id">`feature_flag.set.id`</a> | string | The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs. | `proj-1`; `ab98sgs`; `service1/dev` |  |
|
||||
| <a id="feature-flag-variant" href="#feature-flag-variant">`feature_flag.variant`</a> | string | A semantic identifier for an evaluated flag value. [1] | `red`; `true`; `on` |  |
|
||||
| <a id="feature-flag-version" href="#feature-flag-version">`feature_flag.version`</a> | string | The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset. | `1`; `01ABCDEF` |  |
|
||||
|
||||
**[1] `feature_flag.variant`:** A semantic identifier, commonly referred to as a variant, provides a means
|
||||
**[1] `feature_flag.result.variant`:** 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`.
|
||||
|
||||
---
|
||||
|
||||
`feature_flag.result.reason` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||
|
||||
| Value | Description | Stability |
|
||||
|---|---|---|
|
||||
| `cached` | The resolved value was retrieved from cache. |  |
|
||||
| `default` | The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic evaluation yielded no result). |  |
|
||||
| `disabled` | The resolved value was the result of the flag being disabled in the management system. |  |
|
||||
| `error` | The resolved value was the result of an error. |  |
|
||||
| `split` | The resolved value was the result of pseudorandom assignment. |  |
|
||||
| `stale` | The resolved value is non-authoritative or possibly out of date |  |
|
||||
| `static` | The resolved value is static (no dynamic evaluation). |  |
|
||||
| `targeting_match` | The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting. |  |
|
||||
| `unknown` | The reason for the resolved value could not be determined. |  |
|
||||
|
||||
## Deprecated Feature Flag Attributes
|
||||
|
||||
Describes deprecated feature flag attributes.
|
||||
|
||||
| Attribute | Type | Description | Examples | Stability |
|
||||
|---|---|---|---|---|
|
||||
| <a id="feature-flag-evaluation-reason" href="#feature-flag-evaluation-reason">`feature_flag.evaluation.reason`</a> | string | Deprecated, use `feature_flag.result.reason` instead. | `static`; `targeting_match`; `error`; `default` | <br>Replaced by `feature_flag.result.reason`. |
|
||||
| <a id="feature-flag-variant" href="#feature-flag-variant">`feature_flag.variant`</a> | string | Deprecated, use `feature_flag.result.variant` instead. | `red`; `true`; `on` | <br>Replaced by `feature_flag.result.variant`. |
|
||||
|
||||
---
|
||||
|
||||
`feature_flag.evaluation.reason` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||
|
||||
| Value | Description | Stability |
|
||||
|
|
|
|||
|
|
@ -60,11 +60,11 @@ A `feature_flag.evaluation` event SHOULD be emitted whenever a feature flag valu
|
|||
|---|---|---|---|---|---|
|
||||
| [`feature_flag.key`](/docs/attributes-registry/feature-flag.md) | string | The lookup key of the feature flag. | `logo-color` | `Required` |  |
|
||||
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `provider_not_ready`; `targeting_key_missing`; `provider_fatal`; `general` | `Conditionally Required` [2] |  |
|
||||
| [`feature_flag.variant`](/docs/attributes-registry/feature-flag.md) | string | A semantic identifier for an evaluated flag value. [3] | `red`; `true`; `on` | `Conditionally Required` [4] |  |
|
||||
| [`feature_flag.result.variant`](/docs/attributes-registry/feature-flag.md) | string | A semantic identifier for an evaluated flag value. [3] | `red`; `true`; `on` | `Conditionally Required` [4] |  |
|
||||
| [`feature_flag.context.id`](/docs/attributes-registry/feature-flag.md) | string | The unique identifier for the flag evaluation context. For example, the targeting key. | `5157782b-2203-4c80-a857-dbbd5e7761db` | `Recommended` |  |
|
||||
| [`feature_flag.evaluation.error.message`](/docs/attributes-registry/feature-flag.md) | string | A message explaining the nature of an error occurring during flag evaluation. | `Flag `header-color` expected type `string` but found type `number`` | `Recommended` [5] |  |
|
||||
| [`feature_flag.evaluation.reason`](/docs/attributes-registry/feature-flag.md) | string | The reason code which shows how a feature flag value was determined. | `static`; `targeting_match`; `error`; `default` | `Recommended` |  |
|
||||
| [`feature_flag.provider_name`](/docs/attributes-registry/feature-flag.md) | string | Identifies the feature flag provider. | `Flag Manager` | `Recommended` |  |
|
||||
| [`feature_flag.result.reason`](/docs/attributes-registry/feature-flag.md) | string | The reason code which shows how a feature flag value was determined. | `static`; `targeting_match`; `error`; `default` | `Recommended` |  |
|
||||
| [`feature_flag.set.id`](/docs/attributes-registry/feature-flag.md) | string | The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs. | `proj-1`; `ab98sgs`; `service1/dev` | `Recommended` |  |
|
||||
| [`feature_flag.version`](/docs/attributes-registry/feature-flag.md) | string | The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset. | `1`; `01ABCDEF` | `Recommended` |  |
|
||||
|
||||
|
|
@ -83,12 +83,12 @@ A `feature_flag.evaluation` event SHOULD be emitted whenever a feature flag valu
|
|||
|
||||
**[2] `error.type`:** If and only if an error occurred during flag evaluation.
|
||||
|
||||
**[3] `feature_flag.variant`:** A semantic identifier, commonly referred to as a variant, provides a means
|
||||
**[3] `feature_flag.result.variant`:** 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`.
|
||||
|
||||
**[4] `feature_flag.variant`:** If feature flag provider supplies a variant or equivalent concept.
|
||||
**[4] `feature_flag.result.variant`:** If feature flag provider supplies a variant or equivalent concept.
|
||||
|
||||
**[5] `feature_flag.evaluation.error.message`:** If and only if an error occurred. It's NOT RECOMMENDED to duplicate the value of `error.type` in `feature_flag.evaluation.error.message`.
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ For example, the variant `red` maybe be used for the value `#c05543`.
|
|||
|
||||
---
|
||||
|
||||
`feature_flag.evaluation.reason` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||
`feature_flag.result.reason` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|
||||
|
||||
| Value | Description | Stability |
|
||||
|---|---|---|
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
groups:
|
||||
- id: registry.feature_flag.deprecated
|
||||
type: attribute_group
|
||||
display_name: Deprecated Feature Flag Attributes
|
||||
brief: "Describes deprecated feature flag attributes."
|
||||
attributes:
|
||||
- id: feature_flag.evaluation.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
|
||||
brief: 'Deprecated, use `feature_flag.result.reason` instead.'
|
||||
stability: development
|
||||
deprecated: "Replaced by `feature_flag.result.reason`."
|
||||
examples: ["static", "targeting_match", "error", "default"]
|
||||
- id: feature_flag.variant
|
||||
type: string
|
||||
brief: 'Deprecated, use `feature_flag.result.variant` instead.'
|
||||
stability: development
|
||||
deprecated: "Replaced by `feature_flag.result.variant`."
|
||||
examples: ["red", "true", "on"]
|
||||
|
|
@ -15,7 +15,7 @@ groups:
|
|||
attributes:
|
||||
- ref: feature_flag.key
|
||||
requirement_level: required
|
||||
- ref: feature_flag.variant
|
||||
- ref: feature_flag.result.variant
|
||||
requirement_level:
|
||||
conditionally_required: If feature flag provider supplies a variant or equivalent concept.
|
||||
- ref: feature_flag.provider_name
|
||||
|
|
@ -26,7 +26,7 @@ groups:
|
|||
requirement_level: recommended
|
||||
- ref: feature_flag.set.id
|
||||
requirement_level: recommended
|
||||
- ref: feature_flag.evaluation.reason
|
||||
- ref: feature_flag.result.reason
|
||||
requirement_level: recommended
|
||||
- ref: error.type
|
||||
examples: ["provider_not_ready", "targeting_key_missing", "provider_fatal", "general"]
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ groups:
|
|||
stability: development
|
||||
brief: Identifies the feature flag provider.
|
||||
examples: ["Flag Manager"]
|
||||
- id: feature_flag.variant
|
||||
- id: feature_flag.result.variant
|
||||
type: string
|
||||
stability: development
|
||||
examples: ["red", "true", "on"]
|
||||
|
|
@ -45,7 +45,7 @@ groups:
|
|||
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.evaluation.reason
|
||||
- id: feature_flag.result.reason
|
||||
type:
|
||||
members:
|
||||
- id: static
|
||||
|
|
|
|||
|
|
@ -2,6 +2,13 @@ file_format: 1.1.0
|
|||
schema_url: https://opentelemetry.io/schemas/1.31.0
|
||||
versions:
|
||||
next:
|
||||
all:
|
||||
changes:
|
||||
# https://github.com/open-telemetry/semantic-conventions/pull/1989
|
||||
- rename_attributes:
|
||||
attribute_map:
|
||||
feature_flag.evaluation.reason: feature_flag.result.reason
|
||||
feature_flag.variant: feature_flag.result.variant
|
||||
1.31.0:
|
||||
all:
|
||||
changes:
|
||||
|
|
|
|||
Loading…
Reference in New Issue