Skip to content

Commit

Permalink
fix: deprecate otel hook (#449)
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Kavindu Dodanduwa <[email protected]>
  • Loading branch information
toddbaert and Kavindu-Dodan authored Jul 12, 2023
1 parent 7914b7d commit 58aa56c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/hooks/open-telemetry/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:warning: This package will be deprecated. Please use the telemetry hooks package from `@openfeature/open-telemetry-hooks`.

# OpenTelemetry Hook

The OpenTelemetry hook for OpenFeature provides a [spec compliant][otel-spec] way to automatically add a feature flag evaluation to a span as a span event. Since feature flags are dynamic and affect runtime behavior, it’s important to collect relevant feature flag telemetry signals. This can be used to determine the impact a feature has on a request, enabling enhanced observability use cases, such as A/B testing or progressive feature releases.
Expand Down
3 changes: 3 additions & 0 deletions libs/hooks/open-telemetry/src/lib/open-telemetry-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const spanEventProperties = Object.freeze({
VARIANT: 'feature_flag.variant',
});

/**
* @deprecated OpenTelemetryHook (and this package) will be deprecated. Please use TracingHook from `@openfeature/open-telemetry-hooks`
*/
export class OpenTelemetryHook implements Hook {
after(hookContext: HookContext, evaluationDetails: EvaluationDetails<FlagValue>) {
const currentTrace = trace.getActiveSpan();
Expand Down

0 comments on commit 58aa56c

Please sign in to comment.