-
Notifications
You must be signed in to change notification settings - Fork 49
feat: add appendix D (observability) #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2d44c6d
feat: add appendix D (observability)
toddbaert 5dc802b
fixup: casing note
toddbaert 23efc79
fixup: links
toddbaert d71366d
fixup: add type, value
toddbaert e3a1fcb
Merge branch 'main' into feat/appendix-d-observabilty
toddbaert 1418a22
fixup: version
toddbaert a76ba0e
Merge branch 'main' into feat/appendix-d-observabilty
toddbaert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| id: appendix-d | ||
| title: "Appendix D: Observability" | ||
| description: Conventions for OpenFeature telemetry signals | ||
| sidebar_position: 5 | ||
| --- | ||
|
|
||
| # Appendix D: Observability | ||
|
|
||
| This document describes conventions for extracting data from the OpenFeature SDK for use in telemetry signals. | ||
| It primarily focuses on providing recommendations for mapping well-known fields in OpenFeature to [OpenTelemetry feature-flag log records](https://opentelemetry.io/docs/specs/semconv/feature-flags/feature-flags-logs/) and other semantic conventions. | ||
|
|
||
| ## Evaluations | ||
|
|
||
| Flag evaluation telemetry comprises data resolved from the provider resolution (evaluation details and flag metadata) as well as metadata about the provider itself. | ||
| This is particularly relevant to telemetry-related [hooks](./sections/04-hooks.md). | ||
|
|
||
| ### Evaluation Details | ||
|
|
||
| The following describes how fields on the [evaluation details](types.md#evaluation-details) are mapped to feature flag log records: | ||
|
|
||
| | Evaluation Details Field | Log Record Attribute | Notes | | ||
| | ------------------------ | --------------------------------------- | ---------------------------------------------------- | | ||
| | `flag key` | `feature_flag.key` | See: [flag key](./glossary.md#flag-key) | | ||
| | `error code` | `error.type` | See: [error code](./types.md#error-code) | | ||
| | `variant` | `feature_flag.variant` | See: [variant](./glossary.md#variant) | | ||
| | `error message` | `feature_flag.evaluation.error.message` | An error message associated with a failed evaluation | | ||
toddbaert marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | `reason` | `feature_flag.evaluation.reason` | See: [reason](./types.md#reason) | | ||
|
|
||
| ### Flag Metadata | ||
|
|
||
| The following describes how keys in [flag metadata](types.md#flag-metadata) are mapped to feature flag log records: | ||
|
|
||
| | Flag Metadata Key | Log Record Attribute | Notes | | ||
| | ----------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | `contextId` | `feature_flag.context.id` | The context identifier returned in the flag metadata uniquely identifies the subject of the flag evaluation. If not available, the [targeting key](./glossary.md#targeting-key) should be used. | | ||
| | `flagSetId` | `feature_flag.set.id` | A logical identifier for the [flag set](./glossary.md#flag-set). | | ||
| | `flagSetVersion` | `feature_flag.version` | A version string (format unspecified) for the [flag set](./glossary.md#flag-set). | | ||
|
|
||
| > [!NOTE] | ||
| > Keys in flag metadata use the "camelCase" casing convention, while the OpenTelemetry standard uses a namespaced "snake_case" convention. | ||
|
|
||
| ### Provider Metadata | ||
|
|
||
| | Provider Metadata Field | Log Record Attribute | Notes | | ||
| | ----------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------ | | ||
| | `name` | `feature_flag.provider_name` | The name of the provider as defined in the `provider metadata`, available in the `hook context`. | | ||
toddbaert marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.