Skip to content

Add option to auto instrumentation to prevent sending the LLM prompt … - #121

Merged
PengF (fpfp100) merged 7 commits into
mainfrom
users/pefan/bugfix_12_19
Dec 29, 2025
Merged

Add option to auto instrumentation to prevent sending the LLM prompt …#121
PengF (fpfp100) merged 7 commits into
mainfrom
users/pefan/bugfix_12_19

Conversation

@fpfp100

Copy link
Copy Markdown
Contributor

[Node.js SDK] Add option to auto instrumentation to prevent sending the LLM prompt on InvokeAgent scopes.

@fpfp100
PengF (fpfp100) marked this pull request as ready for review December 19, 2025 20:53
@fpfp100
PengF (fpfp100) requested a review from a team as a code owner December 19, 2025 20:53
Copilot AI review requested due to automatic review settings December 19, 2025 20:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 sendPromptInInvokeAgentScopes configuration 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

@fpfp100

Copy link
Copy Markdown
Contributor Author

Copilot open a new pull request to apply changes based on the comments in this thread

Copilot AI commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings December 20, 2025 00:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 20, 2025 00:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@microsoft Microsoft (microsoft) deleted a comment from Copilot AI Dec 20, 2025
Copilot AI review requested due to automatic review settings December 29, 2025 17:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@fpfp100
PengF (fpfp100) merged commit 4be639f into main Dec 29, 2025
13 checks passed
@sergioescalera

Copy link
Copy Markdown

🤖 SDK Parity Automation

Summary

This PR modifies the Node.js/TypeScript SDK. To maintain feature parity across all SDKs, New parity issues have been created:

What happens next?

  1. Parity issues ready: GitHub Copilot agent (copilot-swe-agent) is assigned to these issues
  2. 🤖 Copilot will work on them: The agent will analyze your changes and generate corresponding PRs for each target SDK
  3. 👀 Review required: Once Copilot creates the PRs, they will need human review before merging

Need to skip parity?

If parity is not needed for a particular SDK, close the corresponding issue with the wontfix label.


Automated by AI-First Polling Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen-experiment AI First experimentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants