-
Notifications
You must be signed in to change notification settings - Fork 745
Default OpenAISettings.EnableSensitiveTelemetryData to TelemetryHelpers.EnableSensitiveDataDefault #12992
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
…rs.EnableSensitiveDataDefault Co-authored-by: JamesNK <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12992Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12992" |
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
This PR aligns OpenAISettings.EnableSensitiveTelemetryData with AzureOpenAISettings by defaulting to TelemetryHelpers.EnableSensitiveDataDefault, ensuring consistent behavior across OpenAI integrations. The property now respects the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT environment variable (defaults to false if unset).
Key changes:
- Updated default value for
EnableSensitiveTelemetryDatato useTelemetryHelpers.EnableSensitiveDataDefault - Enhanced XML documentation to reflect environment variable behavior
- Added comprehensive test coverage for default and configuration override scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Components/Aspire.OpenAI/OpenAISettings.cs |
Modified EnableSensitiveTelemetryData to default to TelemetryHelpers.EnableSensitiveDataDefault and updated XML documentation to describe environment variable behavior |
src/Components/Aspire.OpenAI/Aspire.OpenAI.csproj |
Linked AITelemetryHelpers.cs from Common directory to provide access to TelemetryHelpers class |
tests/Aspire.OpenAI.Tests/AspireOpenAIExtensionsTests.cs |
Added two test methods verifying default behavior based on environment variable and configuration override capability |
|
/backport to release/13.0 |
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19448161972 |
Fixes #12961
Description
Aligns
OpenAISettings.EnableSensitiveTelemetryDatawithAzureOpenAISettingsby defaulting toTelemetryHelpers.EnableSensitiveDataDefault. This ensures consistent behavior across OpenAI integrations - the property now respects theOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTenvironment variable (defaults tofalseif unset).Changes:
EnableSensitiveTelemetryDatadefault value toTelemetryHelpers.EnableSensitiveDataDefaultAITelemetryHelpers.csinAspire.OpenAI.csprojto accessTelemetryHelpersChecklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplateWarning
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:
api.openai.com/home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net10.0/Aspire.OpenAI.Tests --internal-msbuild-node /home/REDACTED/.local/share/37d0e97c58f3460bbe165c654539f648/.p --filter-not-trait category=failing --filter-not-trait quarantined=true --filter-not-trait outerloop=true(dns block)/usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Aspire.OpenAI.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Aspire.OpenAI.Tests.deps.json /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net8.0/Microsoft.DotNet.RemoteExecutor.dll Aspire.OpenAI.Tests, Version=42.42.42.42, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Aspire.OpenAI.Tests.ConformanceTests+<>c <TracingEnablesTheRightActivitySource_Keyed>b__19_0 /tmp/d3zrawk2.bou(dns block)/usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net10.0/Aspire.OpenAI.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net10.0/Aspire.OpenAI.Tests.deps.json /home/REDACTED/work/aspire/aspire/artifacts/bin/Aspire.OpenAI.Tests/Debug/net10.0/Microsoft.DotNet.RemoteExecutor.dll Aspire.OpenAI.Tests, Version=42.42.42.42, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 Aspire.OpenAI.Tests.ConformanceTests+<>c <TracingEnablesTheRightActivitySource_Keyed>b__19_0 /tmp/5ogzjyyl.a1n(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.