المهارات Azure Monitor OpenTelemetry Exporter for Python
📊

Azure Monitor OpenTelemetry Exporter for Python

آمن

将OpenTelemetry数据导出到Azure Application Insights

此技能为Claude Code提供关于Azure Monitor OpenTelemetry Exporter for Python的知识,使开发者能够将自定义遥测管道直接发送到Application Insights进行监控和分析。

يدعم: Claude Codex Code(CC)
🥉 73 برونزي
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "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包含自动检测和预配置的默认值。当您需要对遥测管道进行细粒度控制时,请使用导出器。

التدقيق الأمني

آمن
v1 • 2/25/2026

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.

0
الملفات التي تم فحصها
0
الأسطر التي تم تحليلها
0
النتائج
1
إجمالي عمليات التدقيق
لا توجد مشكلات أمنية
تم تدقيقه بواسطة: claude

درجة الجودة

38
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
50
المجتمع
100
الأمان
83
الامتثال للمواصفات

ماذا يمكنك بناءه

自定义OpenTelemetry管道

为高级监控场景构建具有特定处理器、采样器和导出器的自定义遥测管道

Azure原生监控

将Python应用程序与Azure Application Insights集成,实现企业监控和告警

多服务追踪

通过Application Insights采样在微服务之间实现一致的分布式追踪

جرّب هذه الموجهات

基本跟踪导出
如何设置AzureMonitorTraceExporter将OpenTelemetry跟踪发送到Application Insights?
自定义指标设置
展示如何配置AzureMonitorMetricExporter与自定义meter provider和导出间隔。
日志集成
如何使用BatchLogRecordProcessor将Python日志与AzureMonitorLogExporter集成?
AAD身份验证
配置AzureMonitorTraceExporter使用DefaultAzureCredential进行Azure AD身份验证,而不是使用检测密钥。

أفضل الممارسات

  • 在生产环境中使用BatchSpanProcessor而不是SimpleSpanProcessor,以获得更好的性能
  • 启用ApplicationInsightsSampler以确保分布式服务之间的一致性采样
  • 使用Azure AD身份验证(DefaultAzureCredential)而不是检测密钥,以获得更好的安全性

تجنب

  • 不要在生产环境中使用SimpleSpanProcessor,因为它会在每次导出时阻塞
  • 避免在源代码中硬编码检测密钥 - 请使用环境变量
  • 不要在不了解对遥测可靠性的影响的情况下禁用离线存储

الأسئلة المتكررة

azure-monitor-opentelemetry和azure-monitor-opentelemetry-exporter之间有什么区别?
distro包(azure-monitor-opentelemetry)提供自动检测和开箱即用的默认值。导出器包让您对OpenTelemetry管道进行低级控制。
如何在没有检测密钥的情况下进行身份验证?
通过将DefaultAzureCredential等凭据传递给导出器构造函数而不是连接字符串来使用Azure AD身份验证。
我可以将其与主权云一起使用吗?
是的,使用相应的授权(AzureGovernment或AzureChina)配置凭据,并使用主权云连接字符串。
如果Application Insights不可用会发生什么?
启用离线存储(默认)后,遥测数据会存储在本地,并在连接恢复时重试。如果您不需要这种可靠性,请禁用离线存储。
如何一致地采样跟踪?
使用ApplicationInsightsSampler,它可以协调服务调用之间的采样决策,以确保完整的跟踪。
这是否支持所有遥测类型?
是的,有针对跟踪(AzureMonitorMetricExporter)、指标(AzureMonitorMetricExporter)和日志(AzureMonitorLogExporter)的单独导出器。

تفاصيل المطور

بنية الملفات

📄 SKILL.md