# How to exclude APM self sent events capturing

**URL:** <https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134>\
**Category:** APM\
**Created:** [December 10, 2018, 9:52am UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134 "2018-12-10T09:52:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arsalan\_Rabdanov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arsalan_rabdanov/32/38625_2.png) [@Arsalan\_Rabdanov](https://discuss.elastic.co/u/Arsalan_Rabdanov)\
**Post date:** [December 10, 2018, 9:52am UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/1 "2018-12-10T09:52:48Z")

</div>

Hi! I like a lot solution with elastic APM. I've configured tracing request through microservice gateway to microservices. Tracing timeline visualization looks great. But sometimes **POST apm-server:8200/intake/v2/events** breaks it.

How can i exclude it from timeline?

 ![screenshot](https://us1.discourse-cdn.com/elastic/original/3X/2/2/22903153d9650be4af043572b48991d0f79bfeb0.png)

---

<div class="post-metadata">

**Author:** ![roncohen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roncohen/32/22881_2.png) [@roncohen](https://discuss.elastic.co/u/roncohen)\
**Post date:** [December 10, 2018, 10:15am UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/2 "2018-12-10T10:15:28Z")

</div>

Hi Arsalan,

Thank you for your interest in Elastic APM!  
Which agent are you using? Which version?

best,  
Ron

---

<div class="post-metadata">

**Author:** ![Arsalan\_Rabdanov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arsalan_rabdanov/32/38625_2.png) [@Arsalan\_Rabdanov](https://discuss.elastic.co/u/Arsalan_Rabdanov)\
**Post date:** [December 10, 2018, 10:17am UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/3 "2018-12-10T10:17:48Z")

</div>

"elastic-apm-node": "^2.0.1"

---

<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:** [December 10, 2018, 10:26am UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/4 "2018-12-10T10:26:28Z")

</div>

Hi Arsalan

Thanks for reporting this issue. The Node.js agent should automatically ignore requests to the APM Server so that they are not recorded. So it looks like you've encountered a bug.

Can I ask what you've configured the `serverUrl` config option to?

/thomas

---

<div class="post-metadata">

**Author:** ![Arsalan\_Rabdanov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arsalan_rabdanov/32/38625_2.png) [@Arsalan\_Rabdanov](https://discuss.elastic.co/u/Arsalan_Rabdanov)\
**Post date:** [December 10, 2018, 10:30am UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/5 "2018-12-10T10:30:01Z")

</div>

APM running in docker container with name **apm-server**.  
Node app running in container with link to **apm-server** and enviroment variable ELASTIC\_APM\_SERVER\_URL=http://apm-server:8200.  
serverUrl option is not set.

---

<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:** [December 10, 2018, 10:56am UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/6 "2018-12-10T10:56:45Z")

</div>

I've created a bug report for this on the agent repo: [https://github.com/elastic/apm-agent-nodejs/issues/732](https://github.com/elastic/apm-agent-nodejs/issues/732)

I'm currently investigating and will follow up once I know more.

Once again thanks for reporting this 🙂

/thomas

---

<div class="post-metadata">

**Author:** ![Arsalan\_Rabdanov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arsalan_rabdanov/32/38625_2.png) [@Arsalan\_Rabdanov](https://discuss.elastic.co/u/Arsalan_Rabdanov)\
**Post date:** [December 10, 2018, 5:27pm UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/7 "2018-12-10T17:27:40Z")

</div>

i've sent a PR to repository. i found this bug

> <https://github.com/elastic/apm-agent-nodejs/pull/735>

---

<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:** [December 31, 2018, 1:27pm UTC](https://discuss.elastic.co/t/how-to-exclude-apm-self-sent-events-capturing/160134/8 "2018-12-31T13:27:55Z")

</div>

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