Add option to auto instrumentation to prevent sending the LLM prompt … - #121
Conversation
…on InvokeAgent scopes.
There was a problem hiding this comment.
Pull request overview
This pull request adds a configuration option to the OpenAI Agents auto-instrumentation to control whether LLM prompt content is sent in InvokeAgent scopes. The feature allows users to suppress sensitive prompt data from being recorded in telemetry while still maintaining other trace information.
- Added
sendPromptInInvokeAgentScopesconfiguration option (defaults to true for backward compatibility) - Modified trace processor to conditionally record GEN_AI_INPUT_MESSAGES based on the configuration
- Added comprehensive test coverage for the new prompt suppression functionality
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/agents-a365-observability-extensions-openai/src/OpenAIAgentsTraceInstrumentor.ts | Added sendPromptInInvokeAgentScopes configuration option to the instrumentation config interface and passed it to the trace processor |
| packages/agents-a365-observability-extensions-openai/src/OpenAIAgentsTraceProcessor.ts | Modified to accept and use the sendPromptInInvokeAgentScopes option, conditionally suppressing prompt attributes in generation and response spans |
| tests/observability/extension/openai/OpenAIAgentsTraceProcessor.test.ts | Added comprehensive test suite verifying prompt suppression behavior for both enabled and disabled states across different span types |
|
Copilot open a new pull request to apply changes based on the comments in this thread |
|
PengF (@fpfp100) I've opened a new pull request, #122, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ft/Agent365-nodejs into users/pefan/bugfix_12_19
🤖 SDK Parity AutomationSummaryThis PR modifies the Node.js/TypeScript SDK. To maintain feature parity across all SDKs, New parity issues have been created:
What happens next?
Need to skip parity?If parity is not needed for a particular SDK, close the corresponding issue with the Automated by AI-First Polling Workflow |
[Node.js SDK] Add option to auto instrumentation to prevent sending the LLM prompt on InvokeAgent scopes.