-
Notifications
You must be signed in to change notification settings - Fork 49
feat: add standardized Propagation Evaluation to Flag Metadata. #313
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,15 @@ The following describes how keys in [flag metadata](types.md#flag-metadata) are | |
| ---------------------------- | ----------------------- | ----------------- | -------- | ------------------------------------------------------------------------------------------------ | | ||
| `feature_flag.provider.name` | `name` | `Recommended` | `string` | The name of the provider as defined in the `provider metadata`, available in the `hook context`. | | ||
|
||
### Propagation Metadata | ||
|
||
Feature Flags are propagated through different systems with different methods. Often this updates have an asynchronous nature to the evaluation and do not correlate directly (eg. cached values or in-process evaluations). For distributed systems it is important to reflect how changes are populate to all systems, and how those correlate with evaluations. In a simple manner the version could be used to achieve this, but offers additional and more complex solution to correlate the data. Instead we are defining two additional metadata properties `propagationTraceId` and `propagationSpanId` which can be used to link evaluation spans to propagation spans. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I would not use first person here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I have some things that are not fully clear to me from reading this: How are these defined? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The propagationTraceId and propagationSpanId are flexible. eg. in flagd we would create a trace and span for each GRPC event and add this information to the payload. eg. GRPC streams don't offer a way to propagate headers for events only, they have to be part of the payload. Other connection methods might autopropagate them if possible. But with the persistence in the metadata, we can link the propagating span to the evaluating span (which might be two totally different occasions/traces). I am not the best one, when writing specs, this is my first attempt, and I am happy to explain my thoughts, and maybe this will help to solve the confusion There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I get that concept. What I am not sure about is, how do we define all these things exactly. Maybe it is good enough to add 1 or 2 good examples for a good value for the ids. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Do you mean the version that we defined on the OTEL semconv? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In appendix D, we specify that flag metadata can contain a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, I mean, that I would love this to be a bit more clear that this version is used.
Okay, but what what do you mean with: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could use this version to correlate, but this proposal adds another attribute, which contains the traceid and spanid of the propagating cause. eg. in flagd in-process, we have two non-connected steps for evaluations.
|
||
|
||
| Provider Metadata Field | Requirement level | Type | Notes | | ||
lukas-reining marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ----------------------- | ----------------- | -------- | -------------------------------------- | | ||
| `propagationSpanId` | `Optional` | `string` | The span id of the propagation event. | | ||
| `propagationTraceId` | `Optional` | `string` | The trace id of the propagation event. | | ||
|
||
## History | ||
|
||
Feature flags in the OpenTelemetry semantic conventions are currently in development and are marked as experimental. | ||
|
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.