diff --git a/.chloggen/ff-result-namespace.yaml b/.chloggen/ff-result-namespace.yaml
new file mode 100755
index 0000000000..15f20b016c
--- /dev/null
+++ b/.chloggen/ff-result-namespace.yaml
@@ -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:
diff --git a/docs/attributes-registry/feature-flag.md b/docs/attributes-registry/feature-flag.md
index 803cb30796..76dd3056a4 100644
--- a/docs/attributes-registry/feature-flag.md
+++ b/docs/attributes-registry/feature-flag.md
@@ -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.
|---|---|---|---|---|
| `feature_flag.context.id` | string | The unique identifier for the flag evaluation context. For example, the targeting key. | `5157782b-2203-4c80-a857-dbbd5e7761db` |  |
| `feature_flag.evaluation.error.message` | string | A message explaining the nature of an error occurring during flag evaluation. | `Flag `header-color` expected type `string` but found type `number`` |  |
-| `feature_flag.evaluation.reason` | string | The reason code which shows how a feature flag value was determined. | `static`; `targeting_match`; `error`; `default` |  |
| `feature_flag.key` | string | The lookup key of the feature flag. | `logo-color` |  |
| `feature_flag.provider_name` | string | Identifies the feature flag provider. | `Flag Manager` |  |
+| `feature_flag.result.reason` | string | The reason code which shows how a feature flag value was determined. | `static`; `targeting_match`; `error`; `default` |  |
+| `feature_flag.result.variant` | string | A semantic identifier for an evaluated flag value. [1] | `red`; `true`; `on` |  |
| `feature_flag.set.id` | 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` |  |
-| `feature_flag.variant` | string | A semantic identifier for an evaluated flag value. [1] | `red`; `true`; `on` |  |
| `feature_flag.version` | 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 |
+|---|---|---|---|---|
+| `feature_flag.evaluation.reason` | string | Deprecated, use `feature_flag.result.reason` instead. | `static`; `targeting_match`; `error`; `default` | 
Replaced by `feature_flag.result.reason`. |
+| `feature_flag.variant` | string | Deprecated, use `feature_flag.result.variant` instead. | `red`; `true`; `on` | 
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 |
diff --git a/docs/feature-flags/feature-flags-logs.md b/docs/feature-flags/feature-flags-logs.md
index 2348b5d7a2..8c0b70def5 100644
--- a/docs/feature-flags/feature-flags-logs.md
+++ b/docs/feature-flags/feature-flags-logs.md
@@ -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 |
|---|---|---|
diff --git a/model/feature-flags/deprecated/registry-deprecated.yaml b/model/feature-flags/deprecated/registry-deprecated.yaml
new file mode 100644
index 0000000000..233f3c5e8a
--- /dev/null
+++ b/model/feature-flags/deprecated/registry-deprecated.yaml
@@ -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"]
diff --git a/model/feature-flags/events.yaml b/model/feature-flags/events.yaml
index fa5429af50..22837ea7a2 100644
--- a/model/feature-flags/events.yaml
+++ b/model/feature-flags/events.yaml
@@ -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"]
diff --git a/model/feature-flags/registry.yaml b/model/feature-flags/registry.yaml
index 264d6945be..b86756486f 100644
--- a/model/feature-flags/registry.yaml
+++ b/model/feature-flags/registry.yaml
@@ -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
diff --git a/schema-next.yaml b/schema-next.yaml
index 107d5861a8..76c094c906 100644
--- a/schema-next.yaml
+++ b/schema-next.yaml
@@ -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: