[Otel Hook] Add metrics hook to OpenFeature.Contrib.Hooks.Otel #70
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
We should add a metrics hook to OpenFeature.Contrib.Hooks.Otel.
Similar to other implementations, this should be a breaking change to make the pruposes of each hook clearer.
OtelHook
should be renamed toTracingHook
, and a newMetricsHook
should be added.export const ACTIVE_COUNT_NAME =
${FEATURE_FLAG}.evaluation_active_count
;export const REQUESTS_TOTAL_NAME =
${FEATURE_FLAG}.evaluation_requests_total
;export const SUCCESS_TOTAL_NAME =
${FEATURE_FLAG}.evaluation_success_total
;export const ERROR_TOTAL_NAME =
${FEATURE_FLAG}.evaluation_error_total
;Metrics hook requirements:
should add 4 metrics (
feature_flag.evaluation_active_count, feature_flag.evaluation_requests_total, feature_flag.evaluation_success_total, feature_flag.evaluation_error_total
), similar to the JS / Java / Go implementationssupport a functional means of adding custom attributes to metrics, as in the JS implementation, which allows consumers to provide a function that takes the flag metadata and returns OTel attributes
Rename
OtelHook
intoTracingHook
#112Create a new
MetricsHook
#113The text was updated successfully, but these errors were encountered: