LangSmith 可以通过其内置的 OpenTelemetry 工具捕获由 Microsoft Agent Framework 生成的追踪数据。本指南将展示如何自动捕获来自 Microsoft Agent Framework 智能体的追踪数据,并将其发送到 LangSmith 进行监控和分析。Documentation Index
Fetch the complete documentation index at: https://langchain-zh.cn/llms.txt
Use this file to discover all available pages before exploring further.
安装
安装所需的软件包:设置
1. 配置环境变量
启用智能体的 OpenTelemetry 工具,并设置 OpenTelemetry 环境变量以指向 LangSmith 的 OTEL 端点:2. 在应用中启用 OpenTelemetry
在你的 Microsoft Agent Framework 应用中,使用内置的configure_otel_providers 函数启用 OpenTelemetry 追踪:
设置
enable_sensitive_data=True 允许在追踪中捕获输入和输出内容。如需排除敏感数据,请设置为 False。3. 创建并运行你的智能体
配置完成后,你的 Microsoft Agent Framework 智能体将自动向 LangSmith 发送追踪数据:Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

