# Elastic APM agent VS OpenTelemetry client

**URL:** <https://discuss.elastic.co/t/elastic-apm-agent-vs-opentelemetry-client/332903>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [May 9, 2023, 11:02am UTC](https://discuss.elastic.co/t/elastic-apm-agent-vs-opentelemetry-client/332903 "2023-05-09T11:02:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AThomsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/athomsen/32/103367_2.png) [@AThomsen](https://discuss.elastic.co/u/AThomsen)\
**Post date:** [May 9, 2023, 11:02am UTC](https://discuss.elastic.co/t/elastic-apm-agent-vs-opentelemetry-client/332903/1 "2023-05-09T11:02:53Z")

</div>

Now that Elastic Stack has native support for OpenTelemetry I guess there are (at least) two ways to do APM from a .Net application (the same question is probably valid for java and others as well).

1. Using the [Elastic APM .NET Agent](https://github.com/elastic/apm-agent-dotnet).
2. Using the [The OpenTelemetry .NET Client](https://github.com/open-telemetry/opentelemetry-dotnet).

Looking at Github stats (number of stars, contributers, pulse) OpenTelemetry is way ahead of the Elastic one. Also OT is an open standard implemented by several vendors.

As an Elastic Stack customer, is there any reason to _not_ choose the OpenTelemetry client?

---

<div class="post-metadata">

**Author:** ![GregKalapos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregkalapos/32/37205_2.png) [@GregKalapos](https://discuss.elastic.co/u/GregKalapos)\
**Post date:** [May 9, 2023, 3:16pm UTC](https://discuss.elastic.co/t/elastic-apm-agent-vs-opentelemetry-client/332903/2 "2023-05-09T15:16:26Z")

</div>

Hi @AThomsen,

the observation is correct - Elastic does support OpenTelemetry and you can certainly send data to APM Server by any OpenTelemetry SDK, and this means - as you correctly point out - you have typically 2 options for most technologies.

In general, we support both our custom agents and OTel SDKs (aka clients/agents) as well and we don't specifically push any of the options. We suggest you use whichever is a better fit for you.

And to complete this, our custom agents actually do support OTel directly as well - they are able to ship OTel spans directly (.NET docs can be seen [here](https://www.elastic.co/guide/en/apm/agent/dotnet/current/opentelemetry-bridge.html)) - and we are working on soon shipping OTel metrics as well from the custom Elastic APM Agents.

> As an Elastic Stack customer, is there any reason to _not_ choose the OpenTelemetry client?

Yes, there can be many scenarios, where you may choose to go with an Elastic agent. For example we offer some features which are not present in OTel, e.g. [span compression](https://www.elastic.co/guide/en/apm/guide/current/span-compression.html), [central configuration](https://www.elastic.co/guide/en/kibana/current/agent-configuration.html), [inferred spans in Java](https://www.elastic.co/guide/en/apm/agent/java/current/method-sampling-based.html), and specifically in .NET we have a [zero code change integrations to add a profiler based agent](https://www.elastic.co/blog/whats-new-elastic-observability-8-5-0) which has some integrations that may not yet be covered by OTel (list of library support can be seen [here](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-auto-instrumentation.html)).

Furthermore, most of our agents predate OTel and they have an extremely broad user-base. For those users, it'd be not acceptable to completely switch to another agent - potentially in thousands of services. They also can keep using those agents but still utilize OTel by using the bridge linked above. We definitely don't want to break existing users.

So use whichever agent supports your needs the most - and to be clear if you start completely new and your goal is to just use open standards, then we also agree that you should choose the OTel Client.

---

<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:** [May 30, 2023, 11:16am UTC](https://discuss.elastic.co/t/elastic-apm-agent-vs-opentelemetry-client/332903/3 "2023-05-30T11:16:27Z")

</div>

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