Skip to content

Commit de27a27

Browse files
Yogeshp-MSFTCopilot
andcommitted
Update dotnet/claude/sample-agent/telemetry/A365OtelWrapper.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2ed993e commit de27a27

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dotnet/claude/sample-agent/telemetry/A365OtelWrapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ await AgentMetrics.InvokeObservedAgentOperation(
6565
if (authSystem != null && !string.IsNullOrEmpty(authHandlerName))
6666
agentId = Utility.ResolveAgentIdentity(turnContext, await authSystem.GetTurnTokenAsync(turnContext, authHandlerName));
6767
}
68-
agentId = agentId ?? Guid.Empty.ToString();
68+
agentId = string.IsNullOrEmpty(agentId) ? Guid.Empty.ToString() : agentId;
6969
string? tempTenantId = turnContext?.Activity?.Conversation?.TenantId ?? turnContext?.Activity?.Recipient?.TenantId;
70-
string tenantId = tempTenantId ?? Guid.Empty.ToString();
70+
string tenantId = string.IsNullOrEmpty(tempTenantId) ? Guid.Empty.ToString() : tempTenantId;
7171

7272
return (agentId, tenantId);
7373
}

0 commit comments

Comments
 (0)