You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/attributes-registry/feature-flag.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,18 @@ This document defines attributes for Feature Flags.
16
16
| <aid="feature-flag-key"href="#feature-flag-key">`feature_flag.key`</a> | string | The lookup key of the feature flag. |`logo-color`||
17
17
| <aid="feature-flag-provider-name"href="#feature-flag-provider-name">`feature_flag.provider.name`</a> | string | Identifies the feature flag provider. |`Flag Manager`||
18
18
| <aid="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`||
19
-
| <aid="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`||
19
+
| <aid="feature-flag-result-value"href="#feature-flag-result-value">`feature_flag.result.value`</a> | any | The evaluated value of the feature flag. [1]|`#ff0000`; `true`; `3`||
20
+
| <aid="feature-flag-result-variant"href="#feature-flag-result-variant">`feature_flag.result.variant`</a> | string | A semantic identifier for an evaluated flag value. [2]|`red`; `true`; `on`||
20
21
| <aid="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`||
21
22
| <aid="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`||
22
23
23
-
**[1]`feature_flag.result.variant`:** A semantic identifier, commonly referred to as a variant, provides a means
24
+
**[1]`feature_flag.result.value`:** With some feature flag providers, feature flag results can be quite large or contain private or sensitive details.
25
+
Because of this, `feature_flag.result.variant` is often the preferred attribute if it is available.
26
+
27
+
It may be desirable to redact or otherwise limit the size and scope of `feature_flag.result.value` if possible.
28
+
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.
29
+
30
+
**[2]`feature_flag.result.variant`:** A semantic identifier, commonly referred to as a variant, provides a means
24
31
for referring to a value without including the value itself. This can
25
32
provide additional context for understanding the meaning behind a value.
26
33
For example, the variant `red` maybe be used for the value `#c05543`.
Copy file name to clipboardExpand all lines: docs/feature-flags/feature-flags-logs.md
+15-18Lines changed: 15 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,9 @@ A `feature_flag.evaluation` event SHOULD be emitted whenever a feature flag valu
60
60
|---|---|---|---|---|---|
61
61
|[`feature_flag.key`](/docs/attributes-registry/feature-flag.md)| string | The lookup key of the feature flag. |`logo-color`|`Required`||
62
62
|[`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]||
63
-
|[`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]||
64
-
|[`error.message`](/docs/attributes-registry/error.md)| string | A message providing more detail about an error in human-readable form. [5]|`Unexpected input type: string`; `The user has exceeded their storage quota`|`Recommended`[6]||
63
+
|[`feature_flag.result.value`](/docs/attributes-registry/feature-flag.md)| any | The evaluated value of the feature flag. [3]|`#ff0000`; `true`; `3`|`Conditionally Required`[4]||
64
+
|[`feature_flag.result.variant`](/docs/attributes-registry/feature-flag.md)| string | A semantic identifier for an evaluated flag value. [5]|`red`; `true`; `on`|`Conditionally Required`[6]||
65
+
|[`error.message`](/docs/attributes-registry/error.md)| string | A message providing more detail about an error in human-readable form. [7]|`Unexpected input type: string`; `The user has exceeded their storage quota`|`Recommended`[8]||
65
66
|[`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`||
66
67
|[`feature_flag.provider.name`](/docs/attributes-registry/feature-flag.md)| string | Identifies the feature flag provider. |`Flag Manager`|`Recommended`||
67
68
|[`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`||
@@ -83,16 +84,24 @@ A `feature_flag.evaluation` event SHOULD be emitted whenever a feature flag valu
83
84
84
85
**[2]`error.type`:** If and only if an error occurred during flag evaluation.
85
86
86
-
**[3]`feature_flag.result.variant`:** A semantic identifier, commonly referred to as a variant, provides a means
87
+
**[3]`feature_flag.result.value`:** With some feature flag providers, feature flag results can be quite large or contain private or sensitive details.
88
+
Because of this, `feature_flag.result.variant` is often the preferred attribute if it is available.
89
+
90
+
It may be desirable to redact or otherwise limit the size and scope of `feature_flag.result.value` if possible.
91
+
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.
92
+
93
+
**[4]`feature_flag.result.value`:** If and only if feature flag provider does not supply variant or equivalent concept. Otherwise, `feature_flag.result.value` should be treated as opt-in.
94
+
95
+
**[5]`feature_flag.result.variant`:** A semantic identifier, commonly referred to as a variant, provides a means
87
96
for referring to a value without including the value itself. This can
88
97
provide additional context for understanding the meaning behind a value.
89
98
For example, the variant `red` maybe be used for the value `#c05543`.
90
99
91
-
**[4]`feature_flag.result.variant`:** If feature flag provider supplies a variant or equivalent concept.
100
+
**[6]`feature_flag.result.variant`:** If feature flag provider supplies a variant or equivalent concept.
92
101
93
-
**[5]`error.message`:** Should not simply duplicate the value of `error.type`, but should provide more context. For example, if `error.type` is `invalid_context` the `error.message` may enumerate which context keys are missing or invalid.
102
+
**[7]`error.message`:** Should not simply duplicate the value of `error.type`, but should provide more context. For example, if `error.type` is `invalid_context` the `error.message` may enumerate which context keys are missing or invalid.
94
103
95
-
**[6]`error.message`:** If and only if an error occurred during flag evaluation and `error.type` does not sufficiently describe the error.
104
+
**[8]`error.message`:** If and only if an error occurred during flag evaluation and `error.type` does not sufficiently describe the error.
96
105
97
106
---
98
107
@@ -118,18 +127,6 @@ For example, the variant `red` maybe be used for the value `#c05543`.
118
127
|`targeting_match`| The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting. ||
119
128
|`unknown`| The reason for the resolved value could not be determined. ||
120
129
121
-
**Body fields:**
122
-
123
-
:warning: Body fields will be moved to complex attributes once the
(see [#1870](https://github.com/open-telemetry/semantic-conventions/issues/1870)).
126
-
127
-
| Body Field | Type | Description | Examples |[Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/)| Stability |
128
-
|---|---|---|---|---|---|
129
-
|`value`| undefined | The evaluated value of the feature flag. |`#ff0000`; `1`; `true`|`Conditionally Required`[1]||
130
-
131
-
**[1]`value`:** If and only if feature flag provider does not supply variant or equivalent concept. Otherwise, `value` should be treated as opt-in.
0 commit comments