Set up Elastic APM agent in an application and connect to APM Server

domain: www.elastic.co · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install the Elastic APM agent library for your language (e.g. 'pip install elastic-apm' for Python, '@elastic/apm-node' for Node.js)
  2. Configure the agent with the APM Server URL and a secret token or API key: set ELASTIC_APM_SERVER_URL, ELASTIC_APM_SECRET_TOKEN (or ELASTIC_APM_API_KEY), and ELASTIC_APM_SERVICE_NAME as environment variables or in the agent config
  3. Initialize the agent at application startup before other imports (for Node.js require it as the first line; for Python call elasticapm.instrument() early in the process)
  4. Deploy APM Server configured to accept data from the agent URL and forward to Elasticsearch; set 'output.elasticsearch.hosts' and 'apm-server.auth.secret_token' in apm-server.yml
  5. Verify traces appear in Kibana under Observability > APM > Services; check APM Server logs for auth errors or connectivity issues if the service does not appear

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans