Agent-skills observability-edot-python-instrument
install
source · Clone the upstream repo
git clone https://github.com/elastic/agent-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/elastic/agent-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/observability/edot-python-instrument" ~/.claude/skills/elastic-agent-skills-observability-edot-python-instrument && rm -rf "$T"
manifest:
skills/observability/edot-python-instrument/SKILL.mdsource content
EDOT Python Instrumentation
Read the setup guide before making changes:
Guidelines
- Install
via pip (add toelastic-opentelemetry
or equivalent)requirements.txt - Run
during image build to install auto-instrumentation packages for detected librariesedot-bootstrap --action=install - Wrap the application entrypoint with
— e.g.opentelemetry-instrument
oropentelemetry-instrument gunicorn app:app
. Without this, no telemetry is collectedopentelemetry-instrument python app.py - Set exactly three required environment variables:
OTEL_SERVICE_NAME
— must be the managed OTLP endpoint or EDOT Collector URL. Never use an APM Server URL (noOTEL_EXPORTER_OTLP_ENDPOINT
, noapm-server
, no:8200
)/intake/v2/events
—OTEL_EXPORTER_OTLP_HEADERS
or"Authorization=ApiKey <key>""Authorization=Bearer <token>"
- Do NOT set
,OTEL_TRACES_EXPORTER
, orOTEL_METRICS_EXPORTER
— the defaults are already correctOTEL_LOGS_EXPORTER - Do NOT add code-level SDK setup (no
, noTracerProvider
, etc.) —configure_azure_monitor
handles everythingopentelemetry-instrument - Never run both classic
and EDOT on the same applicationelastic-apm
Examples
See the EDOT Python setup guide for complete examples.