[Elastic APM Node.js troubleshooting docs]: ECONNREFUSED means the agent cannot reach the APM server: check serverUrl, secretToken or apiKey config, and that the server is up from the agent's host. Run the agent with trace logging to capture the full exchange before filing issues. Another common cause of missing trace data with no errors: the agent was not required first in the app entry file, so it could not hook into any modules. Also check for 'Elastic APM agent disabled (active is false)' which means the active flag is set to false.

Context: Agent logs show APM Server transport error (ECONNREFUSED) and no data appears in Kibana.