# Post custom metrics from nodejs apm agent

**URL:** <https://discuss.elastic.co/t/post-custom-metrics-from-nodejs-apm-agent/201307>\
**Category:** APM\
**Tags:** nodejs\
**Created:** [September 26, 2019, 7:33pm UTC](https://discuss.elastic.co/t/post-custom-metrics-from-nodejs-apm-agent/201307 "2019-09-26T19:33:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![karlpokus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karlpokus/32/48868_2.png) [@karlpokus](https://discuss.elastic.co/u/karlpokus)\
**Post date:** [September 26, 2019, 7:33pm UTC](https://discuss.elastic.co/t/post-custom-metrics-from-nodejs-apm-agent/201307/1 "2019-09-26T19:33:21Z")

</div>

Hi!

Is there a way to post custom metrics (other than the existing cpu and mem) from a nodejs apm agent to the apm-server? I'm think of adding a websocket connection tally but can't seem to find anything in the docs: [https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html](https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html)

---

<div class="post-metadata">

**Author:** ![stephenbelanger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenbelanger/32/34880_2.png) [@stephenbelanger](https://discuss.elastic.co/u/stephenbelanger)\
**Post date:** [September 27, 2019, 4:18am UTC](https://discuss.elastic.co/t/post-custom-metrics-from-nodejs-apm-agent/201307/2 "2019-09-27T04:18:01Z")

</div>

Not currently, no. There's no specific timeline for when we might support user-defined metrics.

---

<div class="post-metadata">

**Author:** ![karlpokus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karlpokus/32/48868_2.png) [@karlpokus](https://discuss.elastic.co/u/karlpokus)\
**Post date:** [September 27, 2019, 7:00am UTC](https://discuss.elastic.co/t/post-custom-metrics-from-nodejs-apm-agent/201307/3 "2019-09-27T07:00:51Z")

</div>

@stephenbelanger yeah ok. Is there a way I can hack this? I'm thinking just adding a custom key to a transaction payload? Or would that mess up indexing? My elasticsearch skills are weak at best.

---

<div class="post-metadata">

**Author:** ![stephenbelanger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenbelanger/32/34880_2.png) [@stephenbelanger](https://discuss.elastic.co/u/stephenbelanger)\
**Post date:** [October 7, 2019, 8:25pm UTC](https://discuss.elastic.co/t/post-custom-metrics-from-nodejs-apm-agent/201307/4 "2019-10-07T20:25:41Z")

</div>

No, there's not really a way to do that currently.

---

<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:** [October 28, 2019, 4:25pm UTC](https://discuss.elastic.co/t/post-custom-metrics-from-nodejs-apm-agent/201307/5 "2019-10-28T16:25:52Z")

</div>

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