Skip to content

Commit 2b92832

Browse files
committed
docs(ffe): refresh span-enrichment comments for the ObjectKVStore design
Drop stale design-doc artifacts (DG-/CR-/Pattern labels) and references to the removed native-staging / close-span path and the old accumulate() method.
1 parent 1738ca1 commit 2b92832

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/api/FeatureFlags/Internal/ResultMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private function exposureData($rawResult)
279279
// result actually carried one; a null/absent value must be left out
280280
// entirely rather than defaulted to 0/false. Absence alone does NOT
281281
// mean a runtime default was used -- a waterfall-assigned variant can
282-
// also have no serial id. SpanEnrichmentRegistry::accumulate() only
282+
// also have no serial id. SpanEnrichmentRegistry::record() only
283283
// treats an evaluation as a runtime default when BOTH serialId AND the
284284
// variant are absent.
285285
$serialId = $this->read($rawResult, array('serial_id', 'serialId'), null);

src/api/FeatureFlags/SpanEnrichmentAccumulator.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
* system-tests assert exact parity, so any divergence (signed varint, wrong
1313
* sort, `[object Object]` defaults, bare-vs-JSON tag shape) breaks the chain.
1414
*
15-
* Lifecycle: one instance per root span, request-scoped. The DataDogProvider
16-
* constructs it lazily only when the span-enrichment gate is on (DG-005), and
17-
* the native close-span path flushes + clears it on root-span finish.
15+
* Lifecycle: one instance per root span. SpanEnrichmentRegistry::record()
16+
* lazily attaches it to the root span (via ObjectKVStore) on first evaluation
17+
* and encodes its state onto the root span's meta; it is released with the span.
1818
*/
1919
final class SpanEnrichmentAccumulator
2020
{
@@ -55,8 +55,8 @@ public function addSerialId($id)
5555

5656
/**
5757
* Associate a serial id with a (hashed) subject. The targeting key is
58-
* SHA256-hashed before storage (privacy contract DG-003) and is only ever
59-
* called by the provider when `do_log` authorizes it.
58+
* SHA256-hashed before storage (privacy: raw targeting keys are never
59+
* emitted) and is only recorded when `do_log` authorizes it.
6060
*/
6161
public function addSubject($targetingKey, $id)
6262
{
@@ -114,7 +114,7 @@ public function hasData()
114114
/**
115115
* Encode the accumulated state into the frozen `ffe_*` span tag set.
116116
*
117-
* Output-shape contract (Pattern F):
117+
* Output-shape contract (frozen):
118118
* - ffe_flags_enc => BARE base64 string
119119
* - ffe_subjects_enc => JSON-stringified object {sha256hex: base64}
120120
* - ffe_runtime_defaults => JSON-stringified object {flagKey: valueStr}

0 commit comments

Comments
 (0)