-
Notifications
You must be signed in to change notification settings - Fork 8
[Observability] Expose CallerDetails on ExecuteTool and Inference scopes. #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Exposes CallerDetails (non-agentic caller identity metadata) on the ExecuteTool and Inference tracing scopes and ensures the same metadata flows into ETW/exporter payloads and DTO builders, with corresponding test coverage.
Changes:
- Add optional
callerDetailspropagation intoInferenceScopeandExecuteToolScope(viaOpenTelemetryScope). - Extend ETW logging and DTO builders to include caller attributes (id/name/upn/client ip/tenant id).
- Add/extend unit and integration tests validating caller tags/attributes across tracing, ETW, and exporter paths.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Observability/Runtime/Tracing/Scopes/OpenTelemetryScope.cs | Centralizes setting caller tags for all derived scopes via a new optional constructor parameter. |
| src/Observability/Runtime/Tracing/Scopes/InvokeAgentScope.cs | Removes duplicated caller-tag logic and forwards callerDetails into the base scope. |
| src/Observability/Runtime/Tracing/Scopes/InferenceScope.cs | Adds callerDetails to Start and forwards to OpenTelemetryScope for tag emission. |
| src/Observability/Runtime/Tracing/Scopes/ExecuteToolScope.cs | Adds callerDetails to Start and forwards to OpenTelemetryScope for tag emission. |
| src/Observability/Runtime/Etw/IA365EtwLogger.cs | Extends ETW logging interface methods to accept optional callerDetails. |
| src/Observability/Runtime/Etw/A365EtwLogger.cs | Passes callerDetails into DTO builders for ETW serialization. |
| src/Observability/Runtime/DTOs/Builders/ExecuteToolDataBuilder.cs | Adds caller attributes into execute_tool DTO attributes. |
| src/Observability/Runtime/DTOs/Builders/ExecuteInferenceDataBuilder.cs | Adds caller attributes into inference DTO attributes. |
| src/Observability/Runtime/DTOs/Builders/BaseDataBuilder.cs | Treats caller client IP as reserved and emits it from CallerDetails. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Scopes/InferenceScopeTest.cs | New test asserting caller tags are set when provided. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Scopes/ExecuteToolScopeTest.cs | New test asserting caller tags are set when provided. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Etw/EtwLoggingBuilderTests.cs | Extends ETW builder tests to validate caller attributes in emitted payload. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/ExecuteToolDataBuilderTests.cs | Extends DTO builder tests to validate caller attributes. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/ExecuteInferenceDataBuilderTests.cs | Extends DTO builder tests to validate caller attributes. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.IntegrationTests/Agent365ExporterE2ETests.cs | Extends exporter E2E assertions to validate caller attributes are exported. |
Comments suppressed due to low confidence (1)
src/Observability/Runtime/Etw/IA365EtwLogger.cs:59
- This file is missing the standard Microsoft copyright header at the top (other files in this folder include it, e.g.,
A365EtwLogger.cs). Since this file is being modified, please add the required header to align with repository conventions.
public void LogInferenceCall(
InferenceCallDetails inferenceCallDetails,
AgentDetails agentDetails,
TenantDetails tenantDetails,
string conversationId,
No description provided.