# Deploy OpenTelemetry Collector

**URL:** <https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326>\
**Category:** APM\
**Tags:** java\
**Created:** [September 3, 2020, 4:57am UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326 "2020-09-03T04:57:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)\
**Post date:** [September 3, 2020, 4:57am UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/1 "2020-09-03T04:57:11Z")

</div>

**Kibana version** : 7.6

**Elasticsearch version** : 7.6

**APM Server version** : 7.3.2

**APM Agent language and version** : java 1.9.0

**Fresh install or upgraded from other version?** fresh install

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. :----no

I have converted my opentracing spans to Open telemetry.

I have placed the collector code in my code base and overwrote the elastic exporter. I am not seeing my spans in APM.

I am wondering how the data reaches the collector ? I made the Yaml changes. But not understanding how the collector is invoked? Do we need an opentelemetry agent. Is the collector like a normal repository and agent directly send data to collector ?

---

<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:** [September 3, 2020, 6:05am UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/2 "2020-09-03T06:05:15Z")

</div>

> I am wondering how the data reaches the collector ? I made the Yaml changes. But not understanding how the collector is invoked? Do we need an opentelemetry agent. Is the collector like a normal repository and agent directly send data to collector ?

[OpenTelemetry integration | APM User Guide [8.11] | Elastic](https://www.elastic.co/guide/en/apm/get-started/current/open-telemetry-elastic.html) shows the flow of data from your application, instrumented with the OpenTelemetry SDK, through the OpenTelemetry Collector ("contrib" distribution), and from there to Elastic APM. If you haven't already, please read that. If you have read it, which part are you unsure about?

If you can share your opentelemetry-collector-contrib configuration then we may be able to help debug.

---

<div class="post-metadata">

**Author:** ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)\
**Post date:** [September 3, 2020, 7:31am UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/3 "2020-09-03T07:31:07Z")

</div>

Hi ,

Thanks for reply . I already read through that. I m unsure about the collector part. Am I supposed to download the collector or is it already integrated with ELk and just need to do config chnge?

Also is there a need to have an opentelemetry agent to talk to collector?

---

<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:** [September 3, 2020, 7:50am UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/4 "2020-09-03T07:50:49Z")

</div>

> Thanks for reply . I already read through that. I m unsure about the collector part. Am I supposed to download the collector or is it already integrated with ELk and just need to do config chnge?

Yes, you will need to download and run OpenTelemetry Collector separately. See [https://www.elastic.co/guide/en/apm/get-started/current/open-telemetry-elastic-get-started.html#open-telemetry-elastic-download](https://www.elastic.co/guide/en/apm/get-started/current/open-telemetry-elastic-get-started.html#open-telemetry-elastic-download)

> Also is there a need to have an opentelemetry agent to talk to collector?

You will need the following:

- Elastic APM Server (+Elasticsearch, Kibana)
- OpenTelemetry Collector (contrib), with the Elastic exporter configured to export traces to your Elastic APM Server
- OpenTelemetry SDK (to instrument your application), configured to export traces to the OpenTelemetry Collector

You can run the OpenTelemetry Collector in multiple modes, depending on your needs. Please refer to the "Deployment" section of the OpenTelemetry Collector docs: [Collector | OpenTelemetry](https://opentelemetry.io/docs/collector/about/)

---

<div class="post-metadata">

**Author:** ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)\
**Post date:** [September 4, 2020, 2:17pm UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/5 "2020-09-04T14:17:29Z")

</div>

The documentation from open telemetry is pretty generalzed angvague.  
I tried to do set up and was not successful.

Would have been great if i could follow a better documentation. The elastic docs were like a breeze which lay man can even follow.

---

<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:** [September 7, 2020, 2:07am UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/6 "2020-09-07T02:07:54Z")

</div>

OK, we currently don't have any docs going into detail on OpenTelemetry Collector. Perhaps when things have stabilised more we would have a more detailed quick-start guide.

In the mean time: aside from the links above, you might find this quick-start example helpful:

> **[elastic/apm-contrib](https://github.com/elastic/apm-contrib/tree/master/opentelemetry)**
>
> Contrib repository for Elastic APM. Contribute to elastic/apm-contrib development by creating an account on GitHub.

In it you will find a `docker-compose.yml` which sets up:

- Elasticsearch, Kibana, APM Server
- OpenTelemetry Collector (contrib distribution)
- a Go service instrumented with the Elastic APM Agent
- Python and Node.js services instrumented with the OpenTelemetry SDKs

I just went and updated that repo, as I found the "latest" Docker image of OpenTelemetry Collector has some breaking changes. Perhaps this is why you have had troubles getting things working? Make sure you use the most recent release tag, 0.9.0.

---

<div class="post-metadata">

**Author:** ![AlexeyPirogov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexeypirogov/32/75618_2.png) [@AlexeyPirogov](https://discuss.elastic.co/u/AlexeyPirogov)\
**Post date:** [September 15, 2020, 3:02pm UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/7 "2020-09-15T15:02:30Z")

</div>

Thx @axw, I was able to use docker-compose (Elastic + OP Collector) and send traces to APM with Java OpenTelemetry lib (without agent).

What about metrics?  
I tried to extend collector config with:

> metrics:  
> receivers: [otlp]  
> exporters: [elastic]  
> processors: [batch, queued\_retry]

But getting error in collector logs:

> application run finished with error: cannot setup pipelines: cannot build builtExporters: pipeline "metrics" of data type "metrics" has an exporter "elastic", which does not support that data type

Do I use the wrong config or this functionality not implemented yet?

Thx

---

<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:** [September 16, 2020, 12:17am UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/8 "2020-09-16T00:17:56Z")

</div>

@AlexeyPirogov welcome to the forum!

Glad to hear you were able to get it working. Metrics support is not yet implemented. Please subscribe to [https://github.com/elastic/apm/issues/337](https://github.com/elastic/apm/issues/337) for updates on that.

---

<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 6, 2020, 8:17pm UTC](https://discuss.elastic.co/t/deploy-opentelemetry-collector/247326/9 "2020-10-06T20:17:59Z")

</div>

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