# Microservice tracing is not showing properly

**URL:** <https://discuss.elastic.co/t/microservice-tracing-is-not-showing-properly/372297>\
**Category:** APM\
**Tags:** java\
**Created:** [December 22, 2024, 5:38am UTC](https://discuss.elastic.co/t/microservice-tracing-is-not-showing-properly/372297 "2024-12-22T05:38:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haider665](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@haider665](https://discuss.elastic.co/u/haider665)\
**Post date:** [December 22, 2024, 5:38am UTC](https://discuss.elastic.co/t/microservice-tracing-is-not-showing-properly/372297/1 "2024-12-22T05:38:30Z")

</div>

I have a spring boot microservice project. I am using elk cloud instance for apm and kibana.  
I am using consul as service discovery, rabbitMQ for message processing and webclient for service to service communication.

I run each service using this command -

```auto
java -javaagent:elk-agent/elastic-apm-agent-1.52.1.jar \
-Delastic.apm.service_name=service-name \
-Delastic.apm.secret_token=token \
-Delastic.apm.server_url=url\
-Delastic.apm.environment=local \
-Delastic.apm.universal_profiling_integration_enabled=true \
-Delastic.apm.application_packages=my-package \
-jar app.jar

```

I am facing two issues:

1. There is a http request from **query** service to **auth** service. From the **query** service, the tracing shows the ip address of **oauth** instead of service name. But it works fine for ampq call through rabbitmq.

 ![query-auth-elk](https://us1.discourse-cdn.com/elastic/original/3X/0/1/0143c288a8251053eb5bb5d5ec31f58fac03452f.png)

1. Another problem is, my **dashboard** service has a db call but in the service map, this connection is not shown. Though in the service dashboard tracing section, it detects the db call.

Do I need to add any configuration for webclient or other config?

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [December 23, 2024, 4:39pm UTC](https://discuss.elastic.co/t/microservice-tracing-is-not-showing-properly/372297/2 "2024-12-23T16:39:33Z")

</div>

I think you are hitting a limitation of what information is available at the time of the request. The http request in query doesn't know the name of the service it's sending a request to. It propagates headers, so if the oauth service were running an agent, there would be a span from it and that would resolve the service name instead of the ip.  
The db call should display unless the db is something odd

---

<div class="post-metadata">

**Author:** ![haider665](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@haider665](https://discuss.elastic.co/u/haider665)\
**Post date:** [December 23, 2024, 6:19pm UTC](https://discuss.elastic.co/t/microservice-tracing-is-not-showing-properly/372297/3 "2024-12-23T18:19:11Z")

</div>

the **auth** service has a running agent. I have verified it. I can see the trace of the request sent from the query service. How can I verify that the span id is sent and received properly of not?

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [December 24, 2024, 12:24pm UTC](https://discuss.elastic.co/t/microservice-tracing-is-not-showing-properly/372297/4 "2024-12-24T12:24:18Z")

</div>

hmm, you should see spans in the waterfall view, eg that one you included originally. But that pic showed just the controller and the http call. You'll need to turn your log\_level to debug for the various services and track traces through to get a clearer picture of what is happening. Look for startTransaction, endTransaction, startSpan, endSpan. Filtering on a trace-id is helpful to cut down on the number of log lines to analyze
