Replies: 11 comments 47 replies
-
I think we need at least an optional data/properties parameter. In the more full example context and properties are independent in the segment track spec. Copying the complete track call here for comparison:
In LD we have a "metricValue" and "data" any combination of which can be provided. If there are properties, then we can potentially add some rules internal to the provider. Like a key of "metricValue" will be the associated metric and everything else would be "data". If you want any meaningful measurement then you are doing to need some kind of properties to measure anything other than a binary outcome. |
Beta Was this translation helpful? Give feedback.
-
I just looked again and saw that we have examples for both dynamic and static contexts. For dynamic contexts it makes sense that we'd want to provide evaluation context at the point of the track call. But for static contexts why wouldn't it work the same as flag evaluation itself, where you provide the context once, and don't need to provide it for each |
Beta Was this translation helpful? Give feedback.
-
Do we want to also take on responsibility for sending a Leaving it a responsibility of the provider keeps the OF SDK simpler - and prevents us from having to spec out potentially complex semantics. Taking on responsibility for reporting flag evaluation would allow integrators to bolt analytics capabilities onto a flagging platform that doesn't support it natively, which is actually pretty compelling IMO. |
Beta Was this translation helpful? Give feedback.
-
I wonder if we want to provide some sort of escape-hatch in the For example, LD's track API takes an optional One (perhaps clunky) approach would be an optional |
Beta Was this translation helpful? Give feedback.
-
Is there a reason why |
Beta Was this translation helpful? Give feedback.
-
both LD and Split's My 2c is that we should establish some sort of convention, to encourage providers to do the mapping consistently, but avoid baking it into a spec. |
Beta Was this translation helpful? Give feedback.
-
I have one thought about the separation of concerns. In the case that the OpenFeature SDK would implement If we decide, that the providers should implement feature flag event racking themself, I think having both tracking and flagging in the same provider makes sense. |
Beta Was this translation helpful? Give feedback.
-
As track API can be called with a bulk of events, should it be updated to accept a collection of events ? Example scenario is described by @thomaspoignant when using cache, if considering it similar to "data collection":
The example scenario is a bit different than the described diagram here, as the tracking call is not always called immediately after each remote evaluation, and moreover, when evaluated from cache, tracking event may be called even if no remote evaluation is done. |
Beta Was this translation helpful? Give feedback.
-
When it come to tracking for experimentation, we are capturing the evaluated flag variant id as an indicator to the tracking event that some feature was triggered by the openfeature evaluation API. Within the controller, there may be multiple evaluation API interactions which will each result in a qualification or nonqualification. Regardless of how many evaluations are made, our implementation is only sending the tracking event at the end of the request. Our backend data processing pipeline does most of the heavy lifting while we leverage on a tracking publisher to write some basic metadata to the tracking event.
|
Beta Was this translation helpful? Give feedback.
-
@moredip @weyert @jonathannorris @nicklasl @kinyoklion and anyone else I missed. I've made some updates to this proposal based on the discussions here. Please re-review. If this looks "close enough" I will move towards a specification enhancement so we can work on the nitty-gritty. |
Beta Was this translation helpful? Give feedback.
-
I've opened a PR in the spec here: open-feature/spec#268 |
Beta Was this translation helpful? Give feedback.
-
Tracking proposal
This proposal roughly outlines support for tracking events in OpenFeature.
Particularly when doing experimentation, it may be desirable to associate particular user actions (goals) with feature flag evaluations.
For example, to understand if a UI change controlled by a feature flag increases the likelihood of a user adding an item to their cart, a tracking event which records the fact that a user has added an item is required.
It's important to note that this action doesn't occur in the same transaction (read: HTTP request) as the feature flag evaluation; hence the need for this additional API.
Tracking API (Application-author)
A primitive example of the tracking API presented to application authors:
Tracking interface
For simplicity, the tracking functionality is added to the existing provider objects, either by extending the existing provider interface defined in the implementation, or adding a new interface.
The implementation of the tracking method is optional; provider authors need not support tracking.
SDK implementations must ensure that providers which don't implement
track
result in a no-op whenclient.track(...)
is called.Dynamic context example (server-side)
Static context example (client-side)
Supporting heteromorphic tracking
Native tracking support
For flag management systems which implement tracking, implementation simply amounts to utilizing the tracking API of the underlying system:
Tracking providers
Some flag management systems do not support tracking as a concept at all.
Despite this, OpenFeature users using these systems might be interested in leveraging tracking.
This is a unique benefit that OpenFeature can offer to users; the ability to use OpenFeature as a facade which combines feature flagging with user-analytics.
To support this, tracking providers which only implement the
Track
interface can be created to supplement the functionality of the flag provider.Combined with hooks which report feature flag evaluations to the tracking/analytics platform in question, a tracking provider can allow for robust experimentation even for flag management systems that don't support tracking directly.
Below is a simplified diagram depicting how hooks and the tracking API can be combined to facilitate feature flag experiments, even if the flag management platform in use doesn't support it directly. Providers are omitted for simplicity.
Tracking provider wrapper
To allow users to combine the functionality of a flag provider and a tracking provider, a simple utility can be created which aggregates the two into a single object. Alternatively, the existing multi-provider could also be leveraged for this purpose.
Life-cycle management
The specification already rigorously defines a lifecycle.
This proposal aims to leverage this existing lifecycle to prevent the addition of additional complexity.
The existing provider init, shutdown, etc, can be used for relevant operations of a tracking provider.
For example:
Open questions:
track()
function be synchronous for the static context paradigm and asynchronous for the dynamic paradigm, similar to the evaluation methods?Beta Was this translation helpful? Give feedback.
All reactions