# APM Self Instrumentation outputs

**URL:** <https://discuss.elastic.co/t/apm-self-instrumentation-outputs/207765>\
**Category:** APM\
**Tags:** server\
**Created:** [November 13, 2019, 7:11pm UTC](https://discuss.elastic.co/t/apm-self-instrumentation-outputs/207765 "2019-11-13T19:11:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonmoo-we](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jasonmoo-we](https://discuss.elastic.co/u/jasonmoo-we)\
**Post date:** [November 13, 2019, 7:11pm UTC](https://discuss.elastic.co/t/apm-self-instrumentation-outputs/207765/1 "2019-11-13T19:11:49Z")

</div>

Hi I'm trying to figure out if the apm server self instrumentation [(here)](https://www.elastic.co/guide/en/apm/server/current/monitoring-internal-collection.html) is able to output it's events to kafka?

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [November 14, 2019, 1:55am UTC](https://discuss.elastic.co/t/apm-self-instrumentation-outputs/207765/2 "2019-11-14T01:55:20Z")

</div>

The self-instrumentation is using the APM Go Agent, which only supports sending to an APM Server. If you point the self-instrumentation at another APM Server, then you can configure _that_ to send to Kafka: [https://www.elastic.co/guide/en/apm/server/current/kafka-output.html](https://www.elastic.co/guide/en/apm/server/current/kafka-output.html)

---

<div class="post-metadata">

**Author:** ![jasonmoo-we](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jasonmoo-we](https://discuss.elastic.co/u/jasonmoo-we)\
**Post date:** [November 14, 2019, 5:18pm UTC](https://discuss.elastic.co/t/apm-self-instrumentation-outputs/207765/3 "2019-11-14T17:18:36Z")

</div>

Ok great. So it responds to the go agent environment variables for where to direct the events? I got a little confused because the apm-server config under instrumentation only outputs to elasticsearch.

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [November 15, 2019, 1:19am UTC](https://discuss.elastic.co/t/apm-self-instrumentation-outputs/207765/4 "2019-11-15T01:19:28Z")

</div>

> [@](#):
>
> So it responds to the go agent environment variables for where to direct the events?

Only some of them will be honoured; the expected way to configure the instrumentation is through `apm-server.yml`. For example, `ELASTIC_APM_SERVER_URLS` will be ignored; you must set `apm-server.instrumentation.hosts` in the config file.

> [@](#):
>
> I got a little confused because the apm-server config under instrumentation only outputs to elasticsearch.

There's no output to Elasticsearch under `apm-server.instrumentation`, only configuration to specify external APM Server hosts. Maybe you're confusing that with Elasticsearch, since they have similar ports? (8200 vs. 9200)

> <https://github.com/elastic/apm-server/blob/fcbc361d33631351210717f90c9f83183aecce84/apm-server.yml#L41-L51>

---

<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 5, 2019, 9:19pm UTC](https://discuss.elastic.co/t/apm-self-instrumentation-outputs/207765/5 "2019-12-05T21:19:28Z")

</div>

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