version-0.1 (#1)

Squash and merge of version-0.1

Co-authored-by: James Wampler <james@wamp.dev>
Co-committed-by: James Wampler <james@wamp.dev>
This commit was merged in pull request #1.
This commit is contained in:
2026-07-01 13:30:07 -07:00
committed by wamplerj
parent 8ff071c69b
commit 6887d09f9c
989 changed files with 76379 additions and 18042 deletions

View File

@@ -8,7 +8,8 @@ namespace MicCheck.Api.Features;
public class FeatureEvaluationService(
MicCheckDbContext db,
SegmentEvaluator segmentEvaluator,
FlagCache flagCache)
FlagCache flagCache,
FeatureUsageMetrics usageMetrics)
{
public async Task<IReadOnlyList<FeatureStateResult>> EvaluateForEnvironmentAsync(
int environmentId, CancellationToken ct = default)
@@ -32,6 +33,10 @@ public class FeatureEvaluationService(
).ToListAsync(ct);
flagCache.Set(environmentId, results);
foreach (var r in results)
usageMetrics.RecordEvaluation(environmentId, r.Feature.Id, r.Feature.Name);
return results;
}
@@ -134,6 +139,9 @@ public class FeatureEvaluationService(
}
}
foreach (var r in results)
usageMetrics.RecordEvaluation(environmentId, r.Feature.Id, r.Feature.Name);
return results;
}
}