mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
705473c276
* .Net: Add hosted agent observability sample Mirrors the Python sample added in #5608 for Foundry hosted agents. The .NET hosting library already wires OpenTelemetry automatically via Microsoft.Agents.AI.Foundry.Hosting (ApplyOpenTelemetry) plus Azure.AI.AgentServer.Core's AddAgentHostTelemetry, so no framework changes are needed. The sample is documentation plus a runnable artifact that produces an interesting span tree (invoke_agent / agent_invoke / chat / execute_tool). Adds Hosted-Observability under FoundryHostedAgents/responses with two small tools (GetCurrentLocation, GetWeather), agent.yaml / agent.manifest.yaml declaring OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT (the .NET equivalent of Python's ENABLE_SENSITIVE_DATA), Dockerfile + Dockerfile.contributor, .env.example and README explaining the .NET vs Python defaults. Project added to agent-framework-dotnet.slnx. * Address PR feedback: use Random.Shared and add .dockerignore
35 lines
952 B
YAML
35 lines
952 B
YAML
# yaml-language-server: $schema=https://raw.githubusercontent.com/microsoft/AgentSchema/refs/heads/main/schemas/v1.0/AgentManifest.yaml
|
|
name: hosted-observability
|
|
displayName: "Hosted Observability Agent"
|
|
|
|
description: >
|
|
A hosted Agent Framework agent that demonstrates how the Foundry hosting
|
|
pipeline emits OpenTelemetry traces, metrics and logs to Application Insights
|
|
with no extra wiring required.
|
|
|
|
metadata:
|
|
tags:
|
|
- AI Agent Hosting
|
|
- Azure AI AgentServer
|
|
- Responses Protocol
|
|
- Observability
|
|
- OpenTelemetry
|
|
- Agent Framework
|
|
|
|
template:
|
|
name: hosted-observability
|
|
kind: hosted
|
|
protocols:
|
|
- protocol: responses
|
|
version: 1.0.0
|
|
resources:
|
|
cpu: "0.25"
|
|
memory: 0.5Gi
|
|
environment_variables:
|
|
# Capture prompt / completion / tool argument content on GenAI spans.
|
|
- name: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT
|
|
value: "true"
|
|
parameters:
|
|
properties: []
|
|
resources: []
|