# I don't know where to add about elastic-apm module

**URL:** <https://discuss.elastic.co/t/i-dont-know-where-to-add-about-elastic-apm-module/104198>\
**Category:** APM\
**Created:** [October 17, 2017, 7:43am UTC](https://discuss.elastic.co/t/i-dont-know-where-to-add-about-elastic-apm-module/104198 "2017-10-17T07:43:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [October 17, 2017, 7:43am UTC](https://discuss.elastic.co/t/i-dont-know-where-to-add-about-elastic-apm-module/104198/1 "2017-10-17T07:43:08Z")

</div>

about the flow where to add ? **it about bin/elasticsearch file?**  
Then configure the elastic-apm module inside your application by adding the following lines to the very top of your application code:

// Add this to the VERY top of the first file loaded in your app  
var apm = require('elastic-apm').start({  
// Set required app name (allowed characters: a-z, A-Z, 0-9, -, \_, and space)  
appName: '',

// Set custom APM Server URL (default: [http://localhost:8200](http://localhost:8200))  
serverUrl: ''  
})

---

<div class="post-metadata">

**Author:** ![wa7son](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wa7son/32/21259_2.png) [@wa7son](https://discuss.elastic.co/u/wa7son)\
**Post date:** [October 17, 2017, 7:35pm UTC](https://discuss.elastic.co/t/i-dont-know-where-to-add-about-elastic-apm-module/104198/2 "2017-10-17T19:35:47Z")

</div>

This code snippet is supposed to be added to the application you are monitoring. In you case it looks like you're monitoring a Node.js application. You need to add the "elastic-apm" npm module as a dependency to your Node.js application and add this snippet to the top of your Node.js application source code.

---

<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:** [November 7, 2017, 3:36pm UTC](https://discuss.elastic.co/t/i-dont-know-where-to-add-about-elastic-apm-module/104198/3 "2017-11-07T15:36:01Z")

</div>

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