Conversation
Contributor
|
|
4f56c52 to
9e9d075
Compare
This comment has been minimized.
This comment has been minimized.
29265cb to
ca9bf94
Compare
64c1562 to
bc391b7
Compare
bc391b7 to
8a1102e
Compare
6971663 to
9240286
Compare
11b5f02 to
b825fd9
Compare
sameerank
commented
Mar 24, 2026
Comment on lines
+542
to
+548
| # INVALID_CONTEXT behavioral differences: | ||
| # - Python: Returns for nested dict/list attributes (PyO3 conversion failure) | ||
| # - Go: Flattens nested objects to dot notation instead | ||
| # - Ruby: Silently skips unsupported attribute types | ||
| # - Java: Returns only for null context, not nested attributes | ||
| # - .NET: Relies on native library; not yet standardized | ||
| # - JS: Does not use INVALID_CONTEXT at all |
Author
There was a problem hiding this comment.
I am unclear on how to reconcile the variety of ways that the SDKs handle invalid evaluation contexts. For now I'm just noting it down in the system tests code, and hopefully we can chip away at the @irrelevant decorators it as we keep working on the SDKs
I like the Python approach of returning the default value with reason "error" and code "invalid context", but my hunch is that the varying ways of binding with the Rust evaluator might mean that this isn't straightforward in other languages.
b825fd9 to
290334b
Compare
4307145 to
ffcec93
Compare
Add comprehensive system tests for FFE (Feature Flagging and Experimentation) flag evaluation metrics. These tests verify that tracers emit correct feature_flag.evaluations OTel metrics with proper tags for: - Basic flag evaluation (flag key, variant, reason, allocation_key) - Multiple evaluations (correct count aggregation) - Different flags (separate metric series) - All resolution reasons (static, targeting_match, split, default, disabled) - Error codes (flag_not_found, type_mismatch, parse_error, provider_not_ready) - Lowercase consistency for tag values Also adds the feature_flags_eval_metrics feature declaration for tracer compatibility tracking.
ffcec93 to
adc1a8d
Compare
d56dfe5 to
96216e9
Compare
…pe_mismatch NUMERIC and INTEGER are distinct types; evaluating a NUMERIC flag as INTEGER should return type_mismatch (not parse_error) to align with libdatadog FFE.
88fc527 to
5846f99
Compare
6542ece to
5bf6fb3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add FFE (Feature Flagging & Experimentation) evaluation metrics tests to verify the
feature_flag.evaluationsOTel counter metric works correctly across SDKs.Related:
Changes
Test Infrastructure
tests/ffe/test_flag_eval_metrics.pyfor Python and Go in manifestOTEL_EXPORTER_OTLP_METRICS_PROTOCOL: "http/protobuf"to FFE scenario configopentelemetry-exporter-otlp-proto-http==1.40.0to Python weblogsTest Coverage
Tests for OpenFeature evaluation reasons:
STATIC- catch-all allocation with no rules/shardsTARGETING_MATCH- rules match the contextSPLIT- shards determine variantDEFAULT- rules don't match, fallback usedDISABLED- flag is disabledTests for OpenFeature error codes:
FLAG_NOT_FOUND- config exists but flag missingTYPE_MISMATCH- STRING→BOOLEAN, NUMERIC→INTEGER conversionsPARSE_ERROR- invalid regex pattern (Python only; Go validates at config load)PROVIDER_NOT_READY- no config loadedINVALID_CONTEXT- nested attributes (Python only)TARGETING_KEY_MISSING- verifies it's NOT returned (JS excluded)Cross-SDK Consistency
@irrelevantdecorators where behavior intentionally differsReviewer checklist
tests/ormanifests/is modified? I have the approval from R&P teambuild-XXX-imagelabel is present