# Not seeing logs from OTEL Collector in APM

**URL:** <https://discuss.elastic.co/t/not-seeing-logs-from-otel-collector-in-apm/375275>\
**Category:** Elastic Observability\
**Tags:** docker\
**Created:** [March 2, 2025, 9:02am UTC](https://discuss.elastic.co/t/not-seeing-logs-from-otel-collector-in-apm/375275 "2025-03-02T09:02:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alon\_hen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alon_hen/32/137899_2.png) [@alon\_hen](https://discuss.elastic.co/u/alon_hen)\
**Post date:** [March 2, 2025, 9:02am UTC](https://discuss.elastic.co/t/not-seeing-logs-from-otel-collector-in-apm/375275/1 "2025-03-02T09:02:19Z")

</div>

Hey folks,  
My company decided to start implementing "traces\spans" into our stack and we would like to implement observability over them if possible.

I'm using this docker compose to launch a somewhat working elk stack to be able to just view a working POC of the traces being viewed (this example won't be a production grade deployment that is to say)

- docker compose file - [ELK with fleet and elastic agent · GitHub](https://gist.github.com/Alon-Hen-LS/32759f4992b45fad1fca61aac81c1e70)

- .env file for the docker compose - [.env file for the docker compose of the ELK stack · GitHub](https://gist.github.com/Alon-Hen-LS/5dd4e84dc5c84fccc2e855ffd986e5fa)

- kibana.yml file which is mounted in kibana container - [kibana configuration file used in the docker compose ELK stack · GitHub](https://gist.github.com/Alon-Hen-LS/80661d7911a63d14c923355d5e877b57)

- python application dockerfile - [The Python's dockerfile's which is used in the docker compose to test the traces · GitHub](https://gist.github.com/Alon-Hen-LS/dbac136c8c457c9805f7b902c93ec6d6)

- python application code - [Python application used to test APM tracing in elk · GitHub](https://gist.github.com/Alon-Hen-LS/c6a9185916739d977c3cbbde7e64ba83)

- python requirements.txt file - [requirements file for the dockerfile of the python application to run · GitHub](https://gist.github.com/Alon-Hen-LS/aed09ca58c214879e81c73521466123b)

This is the [guide](https://www.elastic.co/blog/getting-started-with-the-elastic-stack-and-docker-compose-part-2) i used in-order to spin everything up and upbring the current half-working stack

The steps taken are these -

1.Running docker compose to bring up the stack  
2.Setting up the output of the from the "fleet" settings mentioned in the guide i linked above in this stage "_Reconfigure output, add certificate_"  
3.After doing so, i am able to some "Kibana" derived traces and information

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/2/4268cb6ee4e9552e40952c2b14df3bc2f163c092.png)

4.Doing some calls to my python application that the docker compose runs

for example

```auto

command ->

curl -vv localhost:8000/

output ->

{"message":"Failed Successfully :)"}[

```

Then, when checking APM board in Kibana and see my trace

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/7/977133755e7d815967fb8ed284ba959ba01703f9.png)

Now comes the issue, we have set up in an nginx-alpine-otel official image, which is configured to send traces into "otel collector",  
which is running in from this docker image -  
otel/opentelemetry-collector-contrib:0.120.0

And has this configuration file running with it [otel collector configuration file · GitHub](https://gist.github.com/Alon-Hen-LS/340b5873281659efab928873140154da)

(you will see in the configuration file some weird conventions for specifying ports in the configuration linked, u can assume it's static ports which are working, meaning - they receive traffic)

Now I am seeing in this otel collector, logs from nginx being received  
for example:

> <https://gist.github.com/Alon-Hen-LS/eabf0e234b922fef5f0406496f572a00>

And when I look at the elastic agent docker container logs, I do see the logs being received from the collector,

> <https://gist.github.com/Alon-Hen-LS/01c2f3b4ad8f4f839bd54d8ea11dc91a>

But again In the UI I do not see a service\_named “Frontend-Gateway-linux-qa”  
Like the span is sending, what am I missing ?

Would love and appreciate advise on this!

Thanks in advance guys

---

<div class="post-metadata">

**Author:** ![strawgate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/strawgate/32/131008_2.png) [@strawgate](https://discuss.elastic.co/u/strawgate)\
**Post date:** [March 2, 2025, 10:08pm UTC](https://discuss.elastic.co/t/not-seeing-logs-from-otel-collector-in-apm/375275/2 "2025-03-02T22:08:06Z")

</div>

```auto
  otlphttp/kibana:
    traces_endpoint: "http://10.0.1.158:8200"

```

should be

```auto
  otlphttp/kibana:
    traces_endpoint: "http://10.0.1.158:8200/v1/traces"

```

or

```auto
  otlphttp/kibana:
    endpoint: "http://10.0.1.158:8200"

```

When using `endpoint` the exporter automatically appends `/v1/traces` for traces.

The APM Server has a root API node which, unfortunately for this case, returns a 200 success when you POST against it:

```auto
curl -X POST http://127.0.0.1:8200/ \
  -H "Authorization: Bearer secret_token"

{
  "build_date": "2021-12-18T19:59:06Z",
  "build_sha": "24fe620eeff5a19e2133c940c7e5ce1ceddb1445",
  "publish_ready": true,
  "version": "8.17.2"
}

```

So I think what's happening is that the OTLP HTTP Exporter is getting a 200 response code when it POSTS the batch, which it thinks means the batch succeeded. So you get no feedback that something isn't working, and the traces never land in Elasticsearch.

---

<div class="post-metadata">

**Author:** ![alon\_hen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alon_hen/32/137899_2.png) [@alon\_hen](https://discuss.elastic.co/u/alon_hen)\
**Post date:** [March 3, 2025, 9:48am UTC](https://discuss.elastic.co/t/not-seeing-logs-from-otel-collector-in-apm/375275/3 "2025-03-03T09:48:18Z")

</div>

Thank you so much sir!  
it works! , appreciated so much

---

<div class="post-metadata">

**Author:** ![Carson\_Ip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carson_ip/32/115912_2.png) [@Carson\_Ip](https://discuss.elastic.co/u/Carson_Ip)\
**Post date:** [March 3, 2025, 3:05pm UTC](https://discuss.elastic.co/t/not-seeing-logs-from-otel-collector-in-apm/375275/4 "2025-03-03T15:05:35Z")

</div>

Opened an enhancement request: [Return an error on POST requests to `/` · Issue #15965 · elastic/apm-server · GitHub](https://github.com/elastic/apm-server/issues/15965)
