From d6f7c9772a5b6a3997d1219d973aa5fd8ecf934f Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Wed, 12 Jul 2023 13:07:33 -0400 Subject: [PATCH] fixup: fix readme Signed-off-by: Todd Baert --- libs/hooks/open-telemetry/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libs/hooks/open-telemetry/README.md b/libs/hooks/open-telemetry/README.md index 288944aa7..66386ac6e 100644 --- a/libs/hooks/open-telemetry/README.md +++ b/libs/hooks/open-telemetry/README.md @@ -1,6 +1,8 @@ # OpenTelemetry Hook -The OpenTelemetry hooks for OpenFeature provide a [spec compliant][otel-spec] way to automatically add a feature flag evaluation information to traces and metrics. Since feature flags are dynamic and affect runtime behavior, it’s important to collect relevant feature flag telemetry signals. These can be used to determine the impact a feature has on application behavior, enabling enhanced observability use cases, such as A/B testing or progressive feature releases. +The OpenTelemetry hooks for OpenFeature provide a [spec compliant][otel-spec] way to automatically add feature flag evaluation information to traces and metrics. +Since feature flags are dynamic and affect runtime behavior, it’s important to collect relevant feature flag telemetry signals. +These can be used to determine the impact a feature has on application behavior, enabling enhanced observability use cases, such as A/B testing or progressive feature releases. ## Installation @@ -33,13 +35,16 @@ This hook performs metric collection by tapping into various hook stages. Below ## Usage -OpenFeature provides various ways to register hooks. The location that a hook is registered affects when the hook is run. It's recommended to register both the `TracingHook` and `MetricsHook` globally in most situations, but it's possible to only enable the hook on specific clients. You should **never** register these hooks both globally and on a client. +OpenFeature provides various ways to register hooks. The location that a hook is registered affects when the hook is run. +It's recommended to register both the `TracingHook` and `MetricsHook` globally in most situations, but it's possible to only enable the hook on specific clients. +You should **never** register these hooks both globally and on a client. More information on hooks can be found in the [OpenFeature documentation][hook-concept]. ### Register Globally -The `TracingHook` and `MetricsHook` can both be set on the OpenFeature singleton. This will ensure that every flag evaluation will always generate the applicable telemetry signals. +The `TracingHook` and `MetricsHook` can both be set on the OpenFeature singleton. +This will ensure that every flag evaluation will always generate the applicable telemetry signals. ```typescript import { OpenFeature } from '@openfeature/js-sdk'; @@ -50,7 +55,8 @@ OpenFeature.addHooks(new TracingHook()); ### Register Per Client - The `TracingHook` and `MetricsHook` can both be set on an individual client. This should only be done if it wasn't set globally and other clients shouldn't use this hook. Setting the hook on the client will ensure that every flag evaluation performed by this client will always generate the applicable telemetry signals. + The `TracingHook` and `MetricsHook` can both be set on an individual client. This should only be done if it wasn't set globally and other clients shouldn't use this hook. + Setting the hook on the client will ensure that every flag evaluation performed by this client will always generate the applicable telemetry signals. ```typescript import { OpenFeature } from '@openfeature/js-sdk';