# How to ignore certain routes

**URL:** <https://discuss.elastic.co/t/how-to-ignore-certain-routes/189382>\
**Category:** APM\
**Tags:** nodejs\
**Created:** [July 8, 2019, 4:13pm UTC](https://discuss.elastic.co/t/how-to-ignore-certain-routes/189382 "2019-07-08T16:13:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![airstofather](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/airstofather/32/49623_2.png) [@airstofather](https://discuss.elastic.co/u/airstofather)\
**Post date:** [July 8, 2019, 4:13pm UTC](https://discuss.elastic.co/t/how-to-ignore-certain-routes/189382/1 "2019-07-08T16:13:51Z")

</div>

I'd like to know if it's possible to configure an AP agent to ingore certain routes. For instance, I would like the health check routes to be ignored to save on bandwidth and storage.

We're using node js and I'm looing at the configuration files for hints ([https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuring-the-agent.html#agent-configuration-object](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuring-the-agent.html#agent-configuration-object)) but I can't find nothing relevant.

---

<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:** [July 8, 2019, 8:45pm UTC](https://discuss.elastic.co/t/how-to-ignore-certain-routes/189382/2 "2019-07-08T20:45:54Z")

</div>

It certainly is - thanks for asking 😃

You can use either the [`ignoreUrls`](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#ignore-urls) config option, or the [`ignoreUserAgents`](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#ignore-user-agents) config option, depending on your use-case.

---

<div class="post-metadata">

**Author:** ![airstofather](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/airstofather/32/49623_2.png) [@airstofather](https://discuss.elastic.co/u/airstofather)\
**Post date:** [July 9, 2019, 1:37pm UTC](https://discuss.elastic.co/t/how-to-ignore-certain-routes/189382/3 "2019-07-09T13:37:30Z")

</div>

Thanks, I have found another agent configuration page that mentions this and more other configurations.

[https://www.elastic.co/guide/en/apm/agent/nodejs/2.x/configuration.html](https://www.elastic.co/guide/en/apm/agent/nodejs/2.x/configuration.html)

---

<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 30, 2019, 9:37am UTC](https://discuss.elastic.co/t/how-to-ignore-certain-routes/189382/4 "2019-07-30T09:37:30Z")

</div>

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