sanitize appname rowkey

This commit is contained in:
Oliver Kieselbach
2026-04-12 18:32:01 +02:00
parent 7220020a55
commit 37cc7540bf
3 changed files with 3 additions and 3 deletions
@@ -1 +1 @@
914
915
@@ -53,7 +53,7 @@ namespace AutopilotMonitor.Functions.Functions.Ingest
if (!isRelevant) return;
var appName = evt.Data?.ContainsKey("appName") == true ? evt.Data["appName"]?.ToString() : null;
var appName = evt.Data?.ContainsKey("appName") == true ? evt.Data["appName"]?.ToString()?.Trim() : null;
if (string.IsNullOrEmpty(appName)) return;
if (!summaries.TryGetValue(appName, out var state))
@@ -151,7 +151,7 @@ namespace AutopilotMonitor.Functions.Services
try
{
var tableClient = _tableServiceClient.GetTableClient(Constants.TableNames.AppInstallSummaries);
var rowKey = $"{summary.SessionId}_{summary.AppName}";
var rowKey = SanitizeTableKey($"{summary.SessionId}_{summary.AppName}");
// Merge with existing record to preserve StartedAt from a prior batch
var existingResult = await tableClient.GetEntityIfExistsAsync<TableEntity>(summary.TenantId, rowKey);