-
Notifications
You must be signed in to change notification settings - Fork 8
[Observability] Add hiring.manager.id and gen_ai.agent.thought.process attributes #197
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
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
Adds support in the Observability Runtime SDK for two attributes expected by the ingestion service—hiring.manager.id (all scope types) and gen_ai.agent.thought.process (Inference only)—including propagation paths and test coverage updates.
Changes:
- Introduces new OpenTelemetry attribute constants for
hiring.manager.idandgen_ai.agent.thought.process. - Enables setting/propagating
hiring.manager.idviaBaggageBuilder,ActivityProcessor, and DTO builders (InvokeAgent/ExecuteTool/ExecuteInference). - Adds an Inference-only API (
InferenceScope.RecordThoughtProcess) plus DTO support for emittinggen_ai.agent.thought.process, with corresponding tests.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Observability/Runtime/Tracing/Scopes/OpenTelemetryConstants.cs | Adds constants for hiring.manager.id and gen_ai.agent.thought.process. |
| src/Observability/Runtime/Common/BaggageBuilder.cs | Adds HiringManagerId(...) baggage setter. |
| src/Observability/Runtime/Tracing/Processors/ActivityProcessor.cs | Propagates hiring.manager.id from baggage to Activity tags. |
| src/Observability/Runtime/Tracing/Scopes/InferenceScope.cs | Adds RecordThoughtProcess(...) to set the thought-process Activity tag. |
| src/Observability/Runtime/DTOs/Builders/BaseDataBuilder.cs | Treats the new keys as reserved (prevents extraAttributes from overriding them). |
| src/Observability/Runtime/DTOs/Builders/InvokeAgentDataBuilder.cs | Adds optional hiringManagerId emission into InvokeAgent DTO attributes. |
| src/Observability/Runtime/DTOs/Builders/ExecuteToolDataBuilder.cs | Adds optional hiringManagerId emission into ExecuteTool DTO attributes. |
| src/Observability/Runtime/DTOs/Builders/ExecuteInferenceDataBuilder.cs | Adds optional thoughtProcess + hiringManagerId emission into ExecuteInference DTO attributes. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Middleware/BaggageBuilderTests.cs | Tests that HiringManagerId is set/restored in baggage. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Scopes/InferenceScopeTest.cs | Tests RecordThoughtProcess sets the expected Activity tag. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/InvokeAgentDataBuilderTests.cs | Tests hiring.manager.id inclusion in InvokeAgent DTO attributes. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/ExecuteToolDataBuilderTests.cs | Tests hiring.manager.id inclusion in ExecuteTool DTO attributes. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/ExecuteInferenceDataBuilderTests.cs | Tests thought-process + hiring-manager inclusion in ExecuteInference DTO attributes. |
Sentinel mapper on the ingestion service is looking for these but we dont provide a way to set them on the SDK. Bridging the gap.
hiring.manager.id for all scope types via baggage builder / each of the DTOs.
gen_ai.agent.thought.process only for Inference scope.