You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Record flag set ID for OTEL metrics #2020
Hi @toddbaert and @bacherfl — could you take a quick look at this proposed contract before I start implementing it?
I traced the current evaluation telemetry paths. OpenTelemetry already defines the release-candidate feature_flag.set.id attribute, so I think we should use that instead of adding a flagd-specific name.
My proposed behavior is:
add it to impression and reason/error metrics when a non-empty string ID is available;
use each evaluation result’s existing metadata for single and bulk evaluations;
for a failed lookup with an explicit flagSetId selector, use the selected ID;
omit the attribute when the ID is unknown; and
for unfiltered bulk requests spanning multiple sets, attribute each result separately instead of using a synthetic value.
This wouldn’t export arbitrary metadata or change responses, selectors, traces, storage, metric names, or the existing cardinality limit.
Does that behavior sound right, especially using the selector ID for failed lookups and including it on reason/error metrics?
Thanks for checking, @juanparadox. I haven’t started implementation — I’ve only done the setup, source tracing, focused baseline, and posted the contract proposal above, which is still waiting for maintainer confirmation. Please feel free to take it forward; I’m happy to coordinate or collaborate so we don’t duplicate work.
The only real challenge is deciding when to omit the attribute due to cardinality reasons. @gargsajal9 proposal seems to address that pretty thoroughly.
If we are onboard on the approach, I am happy to start the implementation and share the PR for review. @beeme1mr@juanparadox if you are ok should I start working on PR then?
Activity
gargsajal9 commentedon Sep 13, 2026
Hi @toddbaert and @bacherfl — could you take a quick look at this proposed contract before I start implementing it?
I traced the current evaluation telemetry paths. OpenTelemetry already defines the release-candidate
feature_flag.set.idattribute, so I think we should use that instead of adding a flagd-specific name.My proposed behavior is:
flagSetIdselector, use the selected ID;This wouldn’t export arbitrary metadata or change responses, selectors, traces, storage, metric names, or the existing cardinality limit.
Does that behavior sound right, especially using the selector ID for failed lookups and including it on reason/error metrics?
juanparadox commentedon Sep 30, 2026
@gargsajal9 Did you by chance start on this? Didn't want to start work on this if you were already addressing it.
gargsajal9 commentedon Sep 30, 2026
Thanks for checking, @juanparadox. I haven’t started implementation — I’ve only done the setup, source tracing, focused baseline, and posted the contract proposal above, which is still waiting for maintainer confirmation. Please feel free to take it forward; I’m happy to coordinate or collaborate so we don’t duplicate work.
beeme1mr commentedon Oct 2, 2026
Hey @juanparadox and @gargsajal9! I think `feature_flag.set.id, as @gargsajal9 recommend, would be best.
The only real challenge is deciding when to omit the attribute due to cardinality reasons. @gargsajal9 proposal seems to address that pretty thoroughly.
gargsajal9 commentedon Oct 2, 2026
If we are onboard on the approach, I am happy to start the implementation and share the PR for review.
@beeme1mr @juanparadox if you are ok should I start working on PR then?
erka commentedon Oct 2, 2026
Just do it @gargsajal9. It’ll take less time to implement than to discuss it.
gargsajal9 commentedon Oct 2, 2026
Implementation is ready in #2078. It follows the
feature_flag.set.idbehavior discussed abovefeat: add flag set ID to evaluation metrics (open-feature#2078)