# How to create APM agent for node.js application without making changes in application code

**URL:** <https://discuss.elastic.co/t/how-to-create-apm-agent-for-node-js-application-without-making-changes-in-application-code/238525>\
**Category:** APM\
**Tags:** nodejs\
**Created:** [June 24, 2020, 3:37pm UTC](https://discuss.elastic.co/t/how-to-create-apm-agent-for-node-js-application-without-making-changes-in-application-code/238525 "2020-06-24T15:37:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jibitgeorge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jibitgeorge/32/45922_2.png) [@jibitgeorge](https://discuss.elastic.co/u/jibitgeorge)\
**Post date:** [June 24, 2020, 3:37pm UTC](https://discuss.elastic.co/t/how-to-create-apm-agent-for-node-js-application-without-making-changes-in-application-code/238525/1 "2020-06-24T15:37:25Z")

</div>

All components of Elastic are 7.6.2  
Installed from Docker images and deployed on Kubernetes.

I'm able to send data from APM agent associated with a nodejs application by making the following code changes and APM dashboard is showing the transactions properly.

```auto
var apm = require('elastic-apm-node').start({
  serviceName: 'chd',	
  serverUrl: 'http://common-elk-apm-server.default.svc.cluster.local:8200',	
});

```

I would like to know, is there a way I can setup an agent for nodejs application without making changes in application code. Is there a way I can configuration this in kubernetes yml file or something ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 15, 2020, 11:37am UTC](https://discuss.elastic.co/t/how-to-create-apm-agent-for-node-js-application-without-making-changes-in-application-code/238525/2 "2020-07-15T11:37:37Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
