Add SendPromptInInvokeAgentScopes option to OpenAI span processor - #181
Closed
Sergio Escalera (sergioescalera) with Copilot wants to merge 4 commits into
Closed
Add SendPromptInInvokeAgentScopes option to OpenAI span processor#181Sergio Escalera (sergioescalera) with Copilot wants to merge 4 commits into
Sergio Escalera (sergioescalera) with Copilot wants to merge 4 commits into
Conversation
🤖 Auto-AssignmentThis PR was automatically assigned to PengF (@fpfp100) for review. Reason: This is a parity implementation for issue #180, which was triggered by PengF (@fpfp100)'s original PR (microsoft/Agent365-nodejs#121). Next Steps:
Automated by AI-First Polling Workflow |
Copilot started work on behalf of
Sergio Escalera (sergioescalera)
January 9, 2026 18:02
View session
… processor Co-authored-by: sergioescalera <8428450+sergioescalera@users.noreply.github.com>
…feature Co-authored-by: sergioescalera <8428450+sergioescalera@users.noreply.github.com>
Co-authored-by: sergioescalera <8428450+sergioescalera@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update .NET/C# SDK for auto instrumentation feature
Add SendPromptInInvokeAgentScopes option to OpenAI span processor
Jan 9, 2026
Sergio Escalera (sergioescalera)
deleted the
copilot/update-dotnet-sdk-parity
branch
January 9, 2026 19:14
Copilot AI
added a commit
that referenced
this pull request
Feb 24, 2026
Port of Python PR #181. Enables explicit span timestamps for operations recorded after completion (e.g., LangChain tracer using run.start_time/run.end_time). Changes: - OpenTelemetryScope: Add endTime constructor param to complement existing startTime - ExecuteToolScope: Add startTime/endTime params to Start() method - InferenceScope: Add startTime/endTime params to Start() method - InvokeAgentScope: Add startTime/endTime params to Start() method - OutputScope: Add startTime/endTime params to Start() method - Added unit tests for custom time functionality Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Nikhil Navakiran (nikhilNava)
added a commit
that referenced
this pull request
Feb 27, 2026
…205) * Initial plan * Add startTime and endTime parameters to OpenTelemetry scope classes Port of Python PR #181. Enables explicit span timestamps for operations recorded after completion (e.g., LangChain tracer using run.start_time/run.end_time). Changes: - OpenTelemetryScope: Add endTime constructor param to complement existing startTime - ExecuteToolScope: Add startTime/endTime params to Start() method - InferenceScope: Add startTime/endTime params to Start() method - InvokeAgentScope: Add startTime/endTime params to Start() method - OutputScope: Add startTime/endTime params to Start() method - Added unit tests for custom time functionality Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDK parity with Node.js PR #121. Adds configuration to suppress LLM prompt content in InvokeAgent telemetry spans for privacy/security compliance.
Changes
OpenAISpanProcessorOptions: New configuration class withSendPromptInInvokeAgentScopes(defaultstrue)OpenAISpanProcessor: Conditionally removesgen_ai.input.messagestag from InvokeAgent spans when option isfalseBuilderExtensions.WithOpenAI(): Accepts optionalOpenAISpanProcessorOptionsparameterUsage
Scope is limited to InvokeAgent operations. Other scopes (ExecuteInference, ExecuteTool) remain unaffected. Backward compatible - defaults to current behavior.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/microsoft/Agent365-nodejs/pulls/121/files/usr/bin/curl curl -s -H Accept: application/vnd.github.v3+json REDACTED(http block)il-000000000000000000000000000000.00.tenant.api.powerplatform.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenan.t1.tenant.api.powerplatform.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenant1.23.tenant.api.powerplatform.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenant12.3.tenant.api.appsplatform.us/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenant12.3.tenant.api.gov.powerplatform.microsoft.us/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenant12.3.tenant.api.high.powerplatform.microsoft.us/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenant12.3.tenant.api.powerplatform.eaglex.ic.gov/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenant12.3.tenant.api.powerplatform.microsoft.scloud/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenant12.3.tenant.api.powerplatform.partner.microsoftonline.cn/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenantdiscoverynos.et.tenant.api.powerplatform.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)il-tenante.nv.tenant.api.powerplatform.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)override.example.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 34355 --endpoint 127.0.0.1:034355 --role client --parentprocessid 5013 --telemetryoptedin false(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.