Skip to content

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Sep 10, 2025

Description

MEAI will automatically enable sensitive content (aka messages) when this env var is set: dotnet/extensions#6790

Setting this env var in Aspire by default so GenAI telemetry Just Works(tm)*

*when updated MEAI version is released and we update to use it

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@Copilot Copilot AI review requested due to automatic review settings September 10, 2025 01:39
@JamesNK JamesNK requested a review from mitchdenny as a code owner September 10, 2025 01:39
Copy link
Contributor

github-actions bot commented Sep 10, 2025

🚀 Dogfood this PR with:

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11304

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11304"

Copy link
Contributor

@Copilot Copilot AI left a 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 enables detailed GenAI telemetry capture in local development environments by setting the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT environment variable to true. This allows GenAI libraries to automatically capture sensitive content (messages) when running in development mode.

  • Sets the OpenTelemetry GenAI instrumentation environment variable for development environments
  • Updates test assertions to verify the new environment variable is properly configured

Reviewed Changes

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

File Description
src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs Adds the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT environment variable configuration for development mode
tests/Aspire.Hosting.Tests/ProjectResourceTests.cs Updates test to verify the new GenAI telemetry environment variable is set correctly

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 10, 2025
@JamesNK JamesNK requested a review from davidfowl September 10, 2025 01:39
@JamesNK JamesNK added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 10, 2025
@davidfowl davidfowl merged commit df9c0ad into main Sep 10, 2025
601 of 603 checks passed
@davidfowl davidfowl deleted the jamesnk/default-genai-telemetry-messages-on branch September 10, 2025 14:03
@dotnet-policy-service dotnet-policy-service bot added this to the 9.5 milestone Sep 10, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants