Skip to content

Commit

Permalink
Moved feature flags semconv
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Wert <alexander.wert@elastic.co>
  • Loading branch information
AlexanderWert committed Jul 3, 2023
1 parent 676d53a commit 8900b24
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# Logs semantic conventions
/semantic_conventions/logs/ @open-telemetry/specs-semconv-approvers @tigrannajaryan
/specification/exceptions/exceptions-logs.md @open-telemetry/specs-semconv-approvers @tigrannajaryan
/specification/feature-flags/feature-flags-logs.md @open-telemetry/specs-semconv-approvers @tigrannajaryan
/specification/general/events-general.md @open-telemetry/specs-semconv-approvers @tigrannajaryan
/specification/general/logs-general.md @open-telemetry/specs-semconv-approvers @tigrannajaryan
/specification/logs/ @open-telemetry/specs-semconv-approvers @tigrannajaryan
Expand Down
1 change: 1 addition & 0 deletions specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Semantic Conventions are defined for the following areas:
* [Exceptions](exceptions/README.md): Semantic Conventions for Exceptions.
* [FaaS](faas/README.md): Semantic Conventions for Function as a Service (FaaS) operations.
* [CloudEvents](cloudevents/README.md): Semantic Conventions for the CloudEvents specification.
* [Feature Flags](http/README.md): Semantic Conventions for feature flag evaluations.
* [HTTP](http/README.md): Semantic Conventions for HTTP client and server operations.
* [Database](database/README.md): Semantic Conventions for database operations.
* [System](system/README.md): System Semantic Conventions.
Expand Down
13 changes: 13 additions & 0 deletions specification/feature-flags/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Semantic conventions for Feature Flags

**Status**: [Experimental][DocumentStatus]

This document defines semantic conventions for recording dynamic feature flag
evaluations in spans and logs.

Semantic conventions for feature flags are defined for the following signals:

* [Feature Flags in Spans](feature-flags-spans.md): Semantic Conventions for recording feature flags in *spans*.
* [Feature Flags in Logs](feature-flags-logs.md): Semantic Conventions for recording feature flags in *logs*.

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/document-status.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Semantic Conventions for Feature Flag Evaluations
# Semantic Conventions for Feature Flags in Logs

**Status**: [Experimental][DocumentStatus]

Expand All @@ -8,10 +8,10 @@ a [log record](https://github.com/open-telemetry/opentelemetry-specification/tre
This is useful when a flag is evaluated outside of a transaction context
such as when the application loads or on a timer.
To record a flag evaluation as a part of a transaction context,
consider [recording it as a span event](../../trace/semantic_conventions/feature-flags.md).
consider [recording it as a span event](feature-flags-spans.md).

For more information about why it is useful to capture feature flag evaluations,
refer to the [motivation](../../trace/semantic_conventions/feature-flags.md#motivation)
refer to the [motivation](feature-flags-spans.md#motivation)
section of the trace semantic convention for feature flag evaluations.

<!-- toc -->
Expand All @@ -38,9 +38,9 @@ The event name MUST be `feature_flag`.

| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`feature_flag.key`](../../trace/semantic_conventions/feature-flags.md) | string | The unique identifier of the feature flag. | `logo-color` | Required |
| [`feature_flag.provider_name`](../../trace/semantic_conventions/feature-flags.md) | string | The name of the service provider that performs the flag evaluation. | `Flag Manager` | Recommended |
| [`feature_flag.variant`](../../trace/semantic_conventions/feature-flags.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`](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 |

**[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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Semantic conventions for Feature Flags
# Semantic conventions for Feature Flags in Spans

**Status**: [Experimental][DocumentStatus]

This document defines semantic conventions for recording dynamic feature flag
evaluations within a transaction as span events.
To record an evaluation outside of a transaction context, consider
[recording it as a log record](../../logs/semantic_conventions/feature-flags.md).
[recording it as a log record](feature-flags-logs.md).

<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` -->

Expand Down
2 changes: 1 addition & 1 deletion specification/general/logs-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following semantic conventions for logs are defined:

* [General](#general-log-identification-attributes): General semantic attributes that may be used in describing Log Records.
* [Exceptions](/specification/exceptions/exceptions-logs.md): Semantic attributes that may be used in describing exceptions in logs.
* [Feature Flags](/specification/logs/semantic_conventions/feature-flags.md): Semantic attributes that may be used in describing feature flag evaluations in logs.
* [Feature Flags](/specification/feature-flags/feature-flags-logs.md): Semantic attributes that may be used in describing feature flag evaluations in logs.

Apart from semantic conventions for logs, [events](events-general.md), [traces](trace-general.md), and [metrics](metrics-general.md),
OpenTelemetry also defines the concept of overarching [Resources](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.21.0/specification/resource/sdk.md) with their own
Expand Down
2 changes: 1 addition & 1 deletion specification/general/trace-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The following semantic conventions for spans are defined:
* [FaaS](/specification/faas/faas-spans.md): For [Function as a Service](https://en.wikipedia.org/wiki/Function_as_a_service) (e.g., AWS Lambda) spans.
* [Exceptions](/specification/exceptions/exceptions-spans.md): For recording exceptions associated with a span.
* [Compatibility](trace-compatibility.md): For spans generated by compatibility components, e.g. OpenTracing Shim layer.
* [Feature Flags](/specification/trace/semantic_conventions/feature-flags.md): For recording feature flag evaluations associated with a span.
* [Feature Flags](/specification/feature-flags/feature-flags-spans.md): For recording feature flag evaluations associated with a span.

The following library-specific semantic conventions are defined:

Expand Down

0 comments on commit 8900b24

Please sign in to comment.