# How to export from OpenTelemetry to Observability APM

**URL:** <https://discuss.elastic.co/t/how-to-export-from-opentelemetry-to-observability-apm/338250>\
**Category:** APM\
**Tags:** docker, dotnet, server, open-telemetry\
**Created:** [July 12, 2023, 4:27pm UTC](https://discuss.elastic.co/t/how-to-export-from-opentelemetry-to-observability-apm/338250 "2023-07-12T16:27:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fpaul/32/123461_2.png) [@fpaul](https://discuss.elastic.co/u/fpaul)\
**Post date:** [July 12, 2023, 4:27pm UTC](https://discuss.elastic.co/t/how-to-export-from-opentelemetry-to-observability-apm/338250/1 "2023-07-12T16:27:27Z")

</div>

**Kibana version** :  
8.6.2

**Elasticsearch version** :  
8.6.2

**APM Server version** :  
8.6.2

**APM Agent language and version** :

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs?

Nothing special, we have our elastic stack hosted in a Kubernetes cluster.

I'm working on a .NET 7 application that has been instrumented with OpenTelemetry. I'm trying to see my traces in Kibana. Here are my settings

```auto
// OpenTelemetry
            services
                .AddOpenTelemetry()
                .ConfigureResource(
                    resourceBuilder => resourceBuilder.AddService(DiagnosticsConfig.ServiceName)
                )
                .WithTracing(
                    tracerProviderBuilder =>
                        tracerProviderBuilder
                            .AddSource(DiagnosticsConfig.ActivitySource.Name)
                            .AddConsoleExporter()
                            .AddOtlpExporter(opt =>
                            {
                                opt.Protocol = OpenTelemetry
                                    .Exporter
                                    .OtlpExportProtocol
                                    .HttpProtobuf;
                                opt.Endpoint = new Uri(
                                    "https://elastic-apm.dev.blahblah.com"
                                );
                            })
                );

```

When I go to my elastic APM services, I do not see my service.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/0/00df35ac83a8b788366b50627e3dba3683d0f9d1.png)

I have followed the instructions [here](https://www.elastic.co/guide/en/apm/guide/current/open-telemetry.html). The issue comes when I try to implement [this](https://www.elastic.co/guide/en/apm/guide/current/open-telemetry-direct.html#connect-open-telemetry-collector). My config file looks like this

```auto
receivers:
  otlp:
    protocols:
      grpc:
      http:

exporters:
  logging:
    loglevel: debug

  elasticsearch/trace:
    endpoints: [http://apm-server.local:8200]
    user:
    password:
    api_key:
    tls:
      insecure_skip_verify: true

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [elasticsearch/trace]

```

I do not know what to this file in the context of my environment. For more context, the .net 7 app is deployed in a kubernetes cluster with a docker file. I do not manage the elastic stack.

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [July 13, 2023, 6:52am UTC](https://discuss.elastic.co/t/how-to-export-from-opentelemetry-to-observability-apm/338250/2 "2023-07-13T06:52:16Z")

</div>

Can you try with these settings for the `exporters` section:

```auto
exporters:
  logging:
    loglevel: debug 
  elasticsearch/trace: 
    endpoint: "apm-server.local:8200"  
    headers:
      Authorization: "ApiKey <your-api-key>"

```

[Getting Started | OpenTelemetry](https://opentelemetry.io/docs/instrumentation/net/getting-started/#send-data-to-a-collector) describes how to use the config file.

If data still do not show up, please check the `apm-server` log files to see if requests are even sent to the server and if there are any errors logged.

---

<div class="post-metadata">

**Author:** ![fpaul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fpaul/32/123461_2.png) [@fpaul](https://discuss.elastic.co/u/fpaul)\
**Post date:** [July 14, 2023, 7:29pm UTC](https://discuss.elastic.co/t/how-to-export-from-opentelemetry-to-observability-apm/338250/3 "2023-07-14T19:29:11Z")

</div>

I was able to get my traces exported to elastic without using the config file. All I did was remove the line

```auto
.AddConsoleExporter()

```

and it worked.

---

<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:** [August 11, 2023, 7:29pm UTC](https://discuss.elastic.co/t/how-to-export-from-opentelemetry-to-observability-apm/338250/4 "2023-08-11T19:29:36Z")

</div>

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