Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSadfa committed Oct 21, 2024
1 parent cb4e615 commit 49ef1fc
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Microsoft.Extensions.Configuration.AzureAppConfiguration.Extensions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
Expand Down Expand Up @@ -320,11 +321,14 @@ private List<KeyValuePair<string, string>> ProcessMicrosoftSchemaFeatureFlag(Fea

keyValues.Add(new KeyValuePair<string, string>($"{telemetryPath}:{FeatureManagementConstants.Enabled}", telemetry.Enabled.ToString()));

string allocationId = CalculateAllocationId(featureFlag);

if (allocationId != null)
if (featureFlag.Allocation != null)
{
keyValues.Add(new KeyValuePair<string, string>($"{telemetryPath}:{FeatureManagementConstants.Metadata}:{FeatureManagementConstants.AllocationId}", allocationId));
string allocationId = CalculateAllocationId(featureFlag);

if (allocationId != null)
{
keyValues.Add(new KeyValuePair<string, string>($"{telemetryPath}:{FeatureManagementConstants.Metadata}:{FeatureManagementConstants.AllocationId}", allocationId));
}
}
}
}
Expand All @@ -334,10 +338,7 @@ private List<KeyValuePair<string, string>> ProcessMicrosoftSchemaFeatureFlag(Fea

private string CalculateAllocationId(FeatureFlag flag)
{
if (flag.Allocation == null)
{
return null;
}
Debug.Assert(flag.Allocation != null);

StringBuilder inputBuilder = new StringBuilder();

Expand Down

0 comments on commit 49ef1fc

Please sign in to comment.