-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support expanded OpenTelemetry semantic attributes #281
Comments
@beeme1mr We should also track some update to allow for provider specific implementation of For example in LaunchDarkly if we had the following context shape:
We need a way for the The only way I have really thought of so far would be an optional provider method. Something like Thank you, |
Hey @kinyoklion, perhaps the provider could set the For the next steps, I'd like to extend flag metadata to have some named properties like Will that work for your requirements? |
@beeme1mr It may work for this specific situation, in that it will work with events/logs which only harvest data after evaluation. I would be concerned with how we implement It doesn't work with anything you want to be able to correlate with before evaluation, which makes it feel a bit fragile (supporting this specific use-case, but not really the wider potential). If we had the hook-data as well, then someone could use that to add correlation data to something after an evaluation. (Collecting data in earlier stages, pulling out of hook-data in a later state and adding the context id.) |
Hey @kinyoklion, could you please elaborate on how the hook-data proposal would help? I thought the hook data was scoped to each hook. |
@beeme1mr hook-data is scoped per hook and per-evaluation, and allows data to flow between stages. So if you needed to correlate something before evaluation to something after evaluation, then you would add it to your hook-data before evaluation, and then get the That said the only real use-case I have had for it is for making spans, and in that case you always need to do something later anyway. I think that point-in-time related operations are really the only things that need that relationship because you don't really have any extra data before evaluation. So maybe it isn't very important and the larger concern is not conflicting with existing attributes. |
Overview
OpenFeature recently partnered with OpenTelemetry to define the next version of the feature flag semantic convention. This significantly expanded the number of named attributes to better support more sophisticated use cases. Most of the attributes are readily available in OpenFeature hooks. However, some provider-specific attributes like
feature_flag.set.id
andfeature_flag.version
are not easily accessible at the moment. The OpenFeature specification must be adjusted to fully support the new OTel semantics.Proposal
Modify the
finally
stage in hooks to include the evaluation details. The evaluation details should match what's returned to the application developer. This would allow providers to set defined flag metadata that would then be available in a hook. If this proposal is accepted, it may also be worth explicitly defining some well-known attributes to make it easier for provider developers.Consideration
This proposal is a breaking change but should have little to no impact on end users. The
finally
stage had limited value before and was primarily used to end spans or request-based metrics.Another consideration is that providers must return flag metadata in their responses so that they're available in hooks. Providers should also avoid throwing errors and instead return responses with the
REASON
set toERROR
so that flag metadata can be included in the response.The text was updated successfully, but these errors were encountered: