Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1831,12 +1831,6 @@ manifest:
component_version: '>3.7.0'
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Dynamic_Evaluation: v4.0.0
tests/parametric/test_ffe/test_span_enrichment.py: '>=4.9.0' # TODO: a lower version might be supported
tests/parametric/test_ffe/test_span_enrichment.py::Test_Span_Enrichment_Child_Span_Propagation: missing_feature
tests/parametric/test_ffe/test_span_enrichment.py::Test_Span_Enrichment_Default_Fallback: missing_feature
tests/parametric/test_ffe/test_span_enrichment.py::Test_Span_Enrichment_Max_Experiments_Per_Subject: missing_feature
tests/parametric/test_ffe/test_span_enrichment.py::Test_Span_Enrichment_Max_Serial_IDs: missing_feature
tests/parametric/test_ffe/test_span_enrichment.py::Test_Span_Enrichment_Serial_IDs: missing_feature
tests/parametric/test_ffe/test_span_enrichment.py::Test_Span_Enrichment_Subjects: missing_feature
tests/parametric/test_headers_b3.py::Test_Headers_B3: v2.8.0
tests/parametric/test_headers_b3.py::Test_Headers_B3::test_headers_b3_extract_invalid:
- declaration: irrelevant (Deprecated in 3.x)
Expand Down
15 changes: 15 additions & 0 deletions utils/build/docker/python/parametric/apm_test_client/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1431,9 +1431,24 @@ async def ffe_evaluate(request: Request) -> JSONResponse:
default_value = body.get("defaultValue")
targeting_key = body.get("targetingKey")
attributes = body.get("attributes", {})
# span_id is sent by the test client as a STRING (see _test_client_parametric.py:814-815);
# re-activate the caller-supplied root span around the eval so the ffe_* tags (Phase 2) land
# on the test's span. Unknown/missing/unparsable id -> skip activation, never throw (T-01-DOS).
span_id = body.get("span_id")
# Build context
context = EvaluationContext(targeting_key=targeting_key, attributes=attributes)

# Look up the registered span and re-activate it for the duration of the eval, reusing the
# same context-activation primitive that /trace/span/start's start_span(activate=True) relies on.
target_span = None
if span_id is not None:
try:
target_span = spans.get(int(span_id))
except (TypeError, ValueError):
target_span = None
if target_span is not None:
ddtrace.tracer.context_provider.activate(target_span)

# Evaluate based on variation type
value = default_value
reason = "DEFAULT"
Expand Down
Loading