# How to setup transaction Metric for Nodejs Apps

**URL:** <https://discuss.elastic.co/t/how-to-setup-transaction-metric-for-nodejs-apps/171425>\
**Category:** APM\
**Created:** [March 8, 2019, 5:18am UTC](https://discuss.elastic.co/t/how-to-setup-transaction-metric-for-nodejs-apps/171425 "2019-03-08T05:18:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akezakky555](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akezakky555/32/59000_2.png) [@akezakky555](https://discuss.elastic.co/u/akezakky555)\
**Post date:** [March 8, 2019, 5:18am UTC](https://discuss.elastic.co/t/how-to-setup-transaction-metric-for-nodejs-apps/171425/1 "2019-03-08T05:18:31Z")

</div>

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text 🙂

Kibana 6.6.0  
Elasticsearch 6.6.0  
APM-Server 6.6.0  
"elastic-apm-node": "^2.4.0",

So I added config for node.js app at the top of app.js but App send only metric processor (context.System).

if(process.env.NODE\_ENV === 'production' {  
const apm = require('elastic-apm-node')  
apm.start({  
serviceName: 'service',  
secretToken: 'Token',  
serverUrl: '[http://localhost:48200](http://localhost:48200)',  
logLevel: 'debug'  
})  
}

I need help about how to get transaction metric and other metric to APM.

Sorry for my bad english

---

<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:** [March 8, 2019, 11:39am UTC](https://discuss.elastic.co/t/how-to-setup-transaction-metric-for-nodejs-apps/171425/2 "2019-03-08T11:39:38Z")

</div>

I assume with "transaction metric" you're referring to sending transactions and spans to Elastic APM. By default the agent will monitor your application for incoming HTTP requests and automatically create transactions for those and instrument what's going on during each HTTP request.

In case your application doesn't accept incoming HTTP requests, no transactions will be created automatically. Instead you have to use the [Custom Transactions API](https://www.elastic.co/guide/en/apm/agent/nodejs/current/custom-transactions.html).

Does this answer your question?

---

<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:** [March 29, 2019, 7:50am UTC](https://discuss.elastic.co/t/how-to-setup-transaction-metric-for-nodejs-apps/171425/3 "2019-03-29T07:50:03Z")

</div>

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