feat: Add allocation key tag to flag evaluation metrics#4515
feat: Add allocation key tag to flag evaluation metrics#4515gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
Conversation
Emit feature_flag.result.allocation_key tag on feature_flag.evaluations metrics when an allocation matched. The tag is omitted for error/default evaluations where no allocation is present.
BenchmarksBenchmark execution time: 2026-03-09 15:57:03 Comparing candidate commit c008ceb in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 156 metrics, 8 unstable metrics.
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: c008ceb | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
Motivation
Flag evaluation metrics (
feature_flag.evaluations) emit 4 tags but are missing the allocation key. The allocation key is already captured for exposure events. Adding it to eval metrics enables slicing by allocation.Changes
feature_flag.result.allocation_keyattribute to eval metrics, emitted only when an allocation matched (omitted for disabled/default/error with no allocation)Decisions
feature_flag.result.allocation_key(consistent with existingfeature_flag.result.*naming)metadataAllocationKeyconstant fromexposure_hook.goCompanion system-tests change: DataDog/system-tests branch
leo.romanovsky/ffe-eval-metrics