From f0ed29a9c1eaa520fd083cfed6857c128fc198dd Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 27 Mar 2024 14:10:27 +0100 Subject: [PATCH 1/2] Move feature flag attributes to the registry --- docs/attributes-registry/README.md | 1 + docs/attributes-registry/feature-flag.md | 19 +++++++++++++ docs/feature-flags/feature-flags-logs.md | 6 ++--- docs/feature-flags/feature-flags-spans.md | 6 ++--- model/logs/log-feature_flag.yaml | 2 +- model/registry/feature-flag.yaml | 33 +++++++++++++++++++++++ model/trace/feature-flag.yaml | 31 +++------------------ 7 files changed, 64 insertions(+), 34 deletions(-) create mode 100644 docs/attributes-registry/feature-flag.md create mode 100644 model/registry/feature-flag.yaml diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 00ff6ad8e6..b3dbd1a82e 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -40,6 +40,7 @@ Currently, the following namespaces exist: * [Error](error.md) * [Exception](exception.md) * [FaaS](faas.md) +* [Feature Flag](feature-flag.md) * [Host](host.md) * [HTTP](http.md) * [K8s](k8s.md) diff --git a/docs/attributes-registry/feature-flag.md b/docs/attributes-registry/feature-flag.md new file mode 100644 index 0000000000..b1fcf8f872 --- /dev/null +++ b/docs/attributes-registry/feature-flag.md @@ -0,0 +1,19 @@ +# Feature Flag + +## Feature Flag Attributes + +| Attribute | Type | Description | Examples | +|---|---|---|---| +| `feature_flag.key` | string | The unique identifier of the feature flag. | `logo-color` | +| `feature_flag.provider_name` | string | The name of the service provider that performs the flag evaluation. | `Flag Manager` | +| `feature_flag.variant` | string | SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. [1] | `red`; `true`; `on` | + +**[1]:** 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`. + +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. + diff --git a/docs/feature-flags/feature-flags-logs.md b/docs/feature-flags/feature-flags-logs.md index 200229fab7..e86df3b2f3 100644 --- a/docs/feature-flags/feature-flags-logs.md +++ b/docs/feature-flags/feature-flags-logs.md @@ -42,9 +42,9 @@ The event name MUST be `feature_flag`. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| [`feature_flag.key`](feature-flags-spans.md) | string | The unique identifier of the feature flag. | `logo-color` | Required | -| [`feature_flag.provider_name`](feature-flags-spans.md) | string | The name of the service provider that performs the flag evaluation. | `Flag Manager` | Recommended | -| [`feature_flag.variant`](feature-flags-spans.md) | string | SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. [1] | `red`; `true`; `on` | Recommended | +| [`feature_flag.key`](../attributes-registry/feature-flag.md) | string | The unique identifier of the feature flag. | `logo-color` | Recommended | +| [`feature_flag.provider_name`](../attributes-registry/feature-flag.md) | string | The name of the service provider that performs the flag evaluation. | `Flag Manager` | Recommended | +| [`feature_flag.variant`](../attributes-registry/feature-flag.md) | string | SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. [1] | `red`; `true`; `on` | Recommended | **[1]:** A semantic identifier, commonly referred to as a variant, provides a means for referring to a value without including the value itself. This can diff --git a/docs/feature-flags/feature-flags-spans.md b/docs/feature-flags/feature-flags-spans.md index bdd94a0106..da0fa1cc1f 100644 --- a/docs/feature-flags/feature-flags-spans.md +++ b/docs/feature-flags/feature-flags-spans.md @@ -46,9 +46,9 @@ The event name MUST be `feature_flag`. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `feature_flag.key` | string | The unique identifier of the feature flag. | `logo-color` | Required | -| `feature_flag.provider_name` | string | The name of the service provider that performs the flag evaluation. | `Flag Manager` | Recommended | -| `feature_flag.variant` | string | SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. [1] | `red`; `true`; `on` | Recommended | +| [`feature_flag.key`](../attributes-registry/feature-flag.md) | string | The unique identifier of the feature flag. | `logo-color` | Required | +| [`feature_flag.provider_name`](../attributes-registry/feature-flag.md) | string | The name of the service provider that performs the flag evaluation. | `Flag Manager` | Recommended | +| [`feature_flag.variant`](../attributes-registry/feature-flag.md) | string | SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. [1] | `red`; `true`; `on` | Recommended | **[1]:** A semantic identifier, commonly referred to as a variant, provides a means for referring to a value without including the value itself. This can diff --git a/model/logs/log-feature_flag.yaml b/model/logs/log-feature_flag.yaml index 6d902423f5..4530096de7 100644 --- a/model/logs/log-feature_flag.yaml +++ b/model/logs/log-feature_flag.yaml @@ -1,7 +1,7 @@ groups: - id: log-feature_flag type: event - prefix: feature_flag + name: feature_flag brief: > This document defines attributes for feature flag evaluations represented using Log Records. diff --git a/model/registry/feature-flag.yaml b/model/registry/feature-flag.yaml new file mode 100644 index 0000000000..9de106ffc8 --- /dev/null +++ b/model/registry/feature-flag.yaml @@ -0,0 +1,33 @@ +groups: + - id: registry.feature_flag + prefix: feature_flag + type: attribute_group + brief: > + This document defines attributes for Feature Flags. + attributes: + - id: key + type: string + stability: experimental + brief: The unique identifier of the feature flag. + examples: ["logo-color"] + - id: provider_name + type: string + stability: experimental + brief: The name of the service provider that performs the flag evaluation. + examples: ["Flag Manager"] + - id: variant + type: string + stability: experimental + examples: ["red", "true", "on"] + brief: > + SHOULD be a semantic identifier for a value. If one is unavailable, a + stringified version of the value can be used. + 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`. + + 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. diff --git a/model/trace/feature-flag.yaml b/model/trace/feature-flag.yaml index b6bc1ba1dc..8aae493385 100644 --- a/model/trace/feature-flag.yaml +++ b/model/trace/feature-flag.yaml @@ -1,37 +1,14 @@ groups: - id: feature_flag - prefix: feature_flag type: event + name: feature_flag brief: > This semantic convention defines the attributes used to represent a feature flag evaluation as an event. attributes: - - id: key - type: string - stability: experimental + - ref: feature_flag.key requirement_level: required - brief: The unique identifier of the feature flag. - examples: ["logo-color"] - - id: provider_name - type: string - stability: experimental + - ref: feature_flag.provider_name requirement_level: recommended - brief: The name of the service provider that performs the flag evaluation. - examples: ["Flag Manager"] - - id: variant - type: string - stability: experimental + - ref: feature_flag.variant requirement_level: recommended - examples: ["red", "true", "on"] - brief: > - SHOULD be a semantic identifier for a value. If one is unavailable, a - stringified version of the value can be used. - 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`. - - 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. From 640fef769d34dca167f547b01f4ce469397807fe Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 27 Mar 2024 14:12:10 +0100 Subject: [PATCH 2/2] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + .github/ISSUE_TEMPLATE/change_proposal.yaml | 1 + .github/ISSUE_TEMPLATE/new-conventions.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 08dca47531..822f8eb20e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -33,6 +33,7 @@ body: - area:error - area:exception - area:faas + - area:feature-flag - area:host - area:http - area:k8s diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index edaa3a4a75..12381b48fc 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -26,6 +26,7 @@ body: - area:error - area:exception - area:faas + - area:feature-flag - area:host - area:http - area:k8s diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 8a72b6bff2..9f62a77ccc 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -35,6 +35,7 @@ body: - area:error - area:exception - area:faas + - area:feature-flag - area:host - area:http - area:k8s