Skip to content
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

[Otel Hook] Add metrics hook to OpenFeature.Contrib.Hooks.Otel #70

Closed
2 tasks done
toddbaert opened this issue Aug 1, 2023 · 3 comments
Closed
2 tasks done

[Otel Hook] Add metrics hook to OpenFeature.Contrib.Hooks.Otel #70

toddbaert opened this issue Aug 1, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@toddbaert
Copy link
Member

toddbaert commented Aug 1, 2023

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 to TracingHook, and a new MetricsHook 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 implementations

  • support 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 into TracingHook #112

  • Create a new MetricsHook #113

@toddbaert toddbaert added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 1, 2023
@askpt
Copy link
Member

askpt commented Sep 7, 2023

@toddbaert can we split this issue into two separate issues?

  1. Rename OtelHook into TracingHook
  2. Create a new MetricsHook

About point 1, should we keep a "dummy" OtelHook and mark it as deprecated and it will be removed in a later version? Or just rename and the consumers will break upon update?

@toddbaert
Copy link
Member Author

@toddbaert can we split this issue into two separate issues?

  1. Rename OtelHook into TracingHook
  2. Create a new MetricsHook

About point 1, should we keep a "dummy" OtelHook and mark it as deprecated and it will be removed in a later version? Or just rename and the consumers will break upon update?

Yes to all of the above!

@askpt
Copy link
Member

askpt commented Jan 17, 2024

@toddbaert this can be closed since #118 exists now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants