Skip to content
Open
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
7 changes: 4 additions & 3 deletions dd-openfeature/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Settings are read from the Datadog Java agent configuration when attached, then
| `feature_flag.evaluations` OpenTelemetry metric | Yes | Yes |
| Health metrics | No | Agent telemetry |
| Span enrichment | No | Yes |
| `ExposureHook` accessors `getFlagKey()`, `getVariant()`, `getAllocationKey()`, `getTargetingKey()` | The next release after 1.68.1 | The next release after 1.68.1 |
| `ExposureHook` accessors `getFlagKey()`, `getVariant()`, `getAllocationKey()`, `getTargetingKey()` | `dd-openfeature` 1.69.0 or later | `dd-openfeature` 1.69.0 or later |

## Flag selection

Expand Down Expand Up @@ -141,13 +141,14 @@ The map is empty when the split has no such features. Datadog can add destinatio

### Flag metadata

Hooks that use only the OpenFeature API can read the allocation key and the features from the evaluation's flag metadata. Read them in the hook's `finallyAfter` stage, where the details match what the application receives, and skip details that have an error code. The exposure decision (`shouldSend()`, `isExposure()`, `isCacheHit()`) is available only from `ExposureHook`. Other keys that start with `__dd_` are internal and can change without notice.
OpenFeature hooks can read features from the flag metadata of successful evaluations in `finallyAfter`. Use `ExposureHook` for the allocation key (`getAllocationKey()`) and the exposure decision (`shouldSend()`, `isExposure()`, `isCacheHit()`).

| Key | Type | Meaning |
|---|---|---|
| `allocationKey` | String | The selected allocation. `ExposureHook` also gives it as `getAllocationKey()` |
| `__dd_feature.<key>` | String, Double or Boolean | One entry for each feature of the selected split that lists the `HOOK` destination |

Other keys that start with `__dd_` are internal.

### Stop sending exposures to Datadog

```shell
Expand Down
Loading