Azure Monitor OpenTelemetry Exporter for Python
将OpenTelemetry数据导出到Azure Application Insights
此技能为Claude Code提供关于Azure Monitor OpenTelemetry Exporter for Python的知识,使开发者能够将自定义遥测管道直接发送到Application Insights进行监控和分析。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“Azure Monitor OpenTelemetry Exporter for Python”。 How do I export traces to Application Insights?
预期结果:
要导出跟踪到Application Insights,请创建AzureMonitorTraceExporter并将其添加到BatchSpanProcessor。使用您的导出器设置跟踪提供者,然后使用跟踪器创建将自动发送到Azure的跨度。
正在使用“Azure Monitor OpenTelemetry Exporter for Python”。 What is the difference between this exporter and the distro?
预期结果:
azure-monitor-opentelemetry-exporter提供用于自定义管道的低级导出器类。azure-monitor-opentelemetry distro包含自动检测和预配置的默认值。当您需要对遥测管道进行细粒度控制时,请使用导出器。
安全审计
安全This is a documentation-only skill containing only a SKILL.md file with usage examples for the azure-monitor-opentelemetry-exporter Python package. No executable code was scanned. Static analysis found 0 files, 0 lines of code, and 0 security issues. The skill provides legitimate Azure monitoring documentation with no malicious patterns.
质量评分
你能构建什么
自定义OpenTelemetry管道
为高级监控场景构建具有特定处理器、采样器和导出器的自定义遥测管道
Azure原生监控
将Python应用程序与Azure Application Insights集成,实现企业监控和告警
多服务追踪
通过Application Insights采样在微服务之间实现一致的分布式追踪
试试这些提示
如何设置AzureMonitorTraceExporter将OpenTelemetry跟踪发送到Application Insights?
展示如何配置AzureMonitorMetricExporter与自定义meter provider和导出间隔。
如何使用BatchLogRecordProcessor将Python日志与AzureMonitorLogExporter集成?
配置AzureMonitorTraceExporter使用DefaultAzureCredential进行Azure AD身份验证,而不是使用检测密钥。
最佳实践
- 在生产环境中使用BatchSpanProcessor而不是SimpleSpanProcessor,以获得更好的性能
- 启用ApplicationInsightsSampler以确保分布式服务之间的一致性采样
- 使用Azure AD身份验证(DefaultAzureCredential)而不是检测密钥,以获得更好的安全性
避免
- 不要在生产环境中使用SimpleSpanProcessor,因为它会在每次导出时阻塞
- 避免在源代码中硬编码检测密钥 - 请使用环境变量
- 不要在不了解对遥测可靠性的影响的情况下禁用离线存储