observability-edot-python-migrate by elastic/agent-skills
npx skills add https://github.com/elastic/agent-skills --skill observability-edot-python-migrate在进行更改前,请先阅读迁移指南:
elastic-apm,从应用代码中移除 ElasticAPM(app) / elasticapm.contrib.*,移除 app.config['ELASTIC_APM'] 配置块,以及所有 ELASTIC_APM_* 环境变量。elastic-opentelemetry(添加到 或等效文件中)。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
requirements.txtedot-bootstrap --action=install,以安装针对检测到的库的自动插桩包。opentelemetry-instrument 包装应用程序入口点——例如 opentelemetry-instrument gunicorn app:app。没有这一步,将无法收集遥测数据。OTEL_SERVICE_NAME(替代 ELASTIC_APM_SERVICE_NAME)OTEL_EXPORTER_OTLP_ENDPOINT — 必须是托管的 OTLP 端点或EDOT Collector URL。请勿重复使用旧的 ELASTIC_APM_SERVER_URL 值。切勿使用 APM Server URL(不能包含 apm-server、:8200 端口或 /intake/v2/events 路径)。OTEL_EXPORTER_OTLP_HEADERS — "Authorization=ApiKey <key>" 或 "Authorization=Bearer <token>"(替代 ELASTIC_APM_SECRET_TOKEN)OTEL_TRACES_EXPORTER、OTEL_METRICS_EXPORTER 或 OTEL_LOGS_EXPORTER — 默认值已是正确的。elastic-apm 和 EDOT。完整的示例请参阅 EDOT Python 迁移指南。
每周安装量
90
代码仓库
GitHub 星标数
89
首次出现
7 天前
安全审计
已安装于
cursor83
opencode77
gemini-cli77
github-copilot77
codex77
amp76
Read the migration guide before making changes:
elastic-apm from requirements, ElasticAPM(app) / elasticapm.contrib.* from application code, app.config['ELASTIC_APM'] blocks, and all ELASTIC_APM_* env varselastic-opentelemetry via pip (add to requirements.txt or equivalent)edot-bootstrap --action=install during image build to install auto-instrumentation packages for detected librariesopentelemetry-instrument — e.g. opentelemetry-instrument gunicorn app:app. Without this, no telemetry is collectedOTEL_SERVICE_NAME (replaces ELASTIC_APM_SERVICE_NAME)OTEL_EXPORTER_OTLP_ENDPOINT — must be the managed OTLP endpoint or EDOT Collector URL. Do NOT reuse the old ELASTIC_APM_SERVER_URL value. Never use an APM Server URL (no apm-server, no :8200, no /intake/v2/events)OTEL_EXPORTER_OTLP_HEADERS — "Authorization=ApiKey <key>" or "Authorization=Bearer <token>" (replaces )OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER, or OTEL_LOGS_EXPORTER — the defaults are already correctelastic-apm and EDOT on the same applicationSee the EDOT Python migration guide for complete examples.
Weekly Installs
90
Repository
GitHub Stars
89
First Seen
7 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cursor83
opencode77
gemini-cli77
github-copilot77
codex77
amp76
ELASTIC_APM_SECRET_TOKEN