-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: ofep for metric hooks #62
feat: ofep for metric hooks #62
Conversation
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we define the naming of the exposed metrics as part of this OFEP or would be this covered in the following up spec change?
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Right now there's no OpenFeature spec section defining semantic conventions. So if we see the need, we will need to introduce this first (And also include span names that we already have). Another option is to define and adhere to the names of the metrics through this OFEP and adhere to that. |
I think we need an additional dimension that represents the configuration of the feature flag being evaluated. The terminology varies depending on the implementation, but many have concepts like project, workspace, namespace, or app. Within that collection, there tend to be environment-specific configurations (e.g. dev, hardening, production). Depending on the provider, you would want to split impressions based on those concepts. Perhaps we could call it a |
Isn't this already covered by Evaluation Context [1], which is available through hook context [2] ? Probably the intended identifier maps to the If so, I think we can include this as a dimension of [1] - https://openfeature.dev/specification/sections/evaluation-context |
Yes, capturing that information as flag metadata is possible but I'm wondering if we can figure out what we want to call that property. |
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
7dc5671
to
b9d8273
Compare
Nice, I am having some metrics: https://github.com/Tapico/node-posthog-openfeature/blob/main/src/hooks/OpenTelemetryHook.ts Works pretty well |
Anyway, we should consider about privacy into account when using context data for metric dimensions, as these identifiers may include personal information such as user emails. |
That's nice :) If OFEP goes well, we will soon have official OpenFeature metrics hook for JS |
If we think it's not too far out of scope (no pun indented) for this OFEP I'd like to agree on that here as well. |
Agree with the explanation & +1 for This dimension can be optional and if present will benefit drill-downs when analyzing metrics (ex:- project scoped flag evaluation dashboard) [1] - https://github.com/open-feature/spec/blob/main/specification/types.md#flag-metadata |
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
@thisthat @beeme1mr I updated metrics names proposed through this OFEP. They now have
Let me know your thoughts on this [1] - https://opentelemetry.io/docs/specs/otel/logs/semantic_conventions/feature-flags/ |
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
This looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should include a section on scope
as a possible dimension. I think that will be required to use these metrics in a vendor-agnostic way. Once that's in place, I'm happy with the OFEP.
I'll mention this in the community meeting. If we have the approvals and no blockers, let's aim for merging this on Friday.
d29ccbd
to
22d6bb2
Compare
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
I think we have sufficient consensus for this one. This is not a spec change, it just establishes some consistency around some of the OTel-related extensions/hooks. Merging. |
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
This PR
Introduce an enhancement proposal to introduce OpenTelemetry metric hooks.
Consider checking PR [1] for a POC implementation in Go sdk.
Besides, see below Prometheus samples for metrics,
feature_flag.evaluation_requests_total
feature_flag.evaluation_success_total
feature_flag.evaluation_error_total
feature_flag.evaluation_requests_total
[1] - open-feature/go-sdk-contrib#217