Skip to content

Commit

Permalink
Add IDType to GCIR (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
sroyal-statsig authored Oct 9, 2024
1 parent cc95848 commit b14f020
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dotnet-statsig/src/Statsig/Server/Evaluation/Evaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ internal EvaluationDetails GetEvaluationDetails(string? reason = null)
["rule_id"] = gate.RuleID,
["secondary_exposures"] = HashExposures(CleanExposures(gate.SecondaryExposures), hash).ToArray(),
};
if (kv.Value.IDType != null)
{
entry["id_type"] = kv.Value.IDType;
}
gates.Add(hashedName, entry);
}

Expand All @@ -369,6 +373,11 @@ internal EvaluationDetails GetEvaluationDetails(string? reason = null)
var hashedName = HashName(kv.Value.Name, hash);
var config = includeLocalOverrides ? GetConfig(user, kv.Key, null).ConfigValue : Evaluate(user, kv.Value, 0).ConfigValue;
var entry = ConfigSpecToInitResponse(hashedName, kv.Value, config, hash);
if (kv.Value.IDType != null)
{
entry["id_type"] = kv.Value.IDType;
}

if (kv.Value.Entity != "dynamic_config" && kv.Value.Entity != "autotune")
{
entry["is_experiment_active"] = kv.Value.IsActive;
Expand Down

0 comments on commit b14f020

Please sign in to comment.