Skip to content

Update Aspire AI integrations with telemetry changes #4518

@JamesNK

Description

@JamesNK

This PR - dotnet/aspire#11237 - changes Aspire's AI model integrations to use Microsoft.Extensions.AI for telemetry instead of using telemetry built into underlying libraries, e.g. OpenAI, Azure Interference.

Documentation should be updated to reflect new behavior:

An important note is telemetry will only be recorded if used via Microsoft.Extension.AI's IChatClient

Changes to make:

  • Show how to configure integration to return IChatClient and have sample calls of using IChatClient
    • Add UseChatClient() to configuration
    • Inject IChatClient
    • Call chat client method
  • Discuss that telemetry is only enabled by default when IChatClient is used. MEAI records telemetry to Experimental.Microsoft.Extensions.AI activity source and meter.
  • Mention the new EnableSensitiveTelemetryData setting which can be used to include sensitive message content in telemetry
  • Discuss that underlying library's telemetry can still be manually by adding activity and meter to OTEL configuration

cc @eerhardt @sebastienros


Associated WorkItem - 487970

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.area-docs

Type

Projects

Status

👀 In review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions