# Backend calls not being traced

**URL:** <https://discuss.elastic.co/t/backend-calls-not-being-traced/343657>\
**Category:** Elastic Observability\
**Created:** [September 22, 2023, 10:20pm UTC](https://discuss.elastic.co/t/backend-calls-not-being-traced/343657 "2023-09-22T22:20:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johngregg](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@johngregg](https://discuss.elastic.co/u/johngregg)\
**Post date:** [September 22, 2023, 10:20pm UTC](https://discuss.elastic.co/t/backend-calls-not-being-traced/343657/1 "2023-09-22T22:20:40Z")

</div>

I am using the 1.42 java agent with java 11.

Some of my backend calls are not being traced. I have multiple backends that I use Apache HttpClient 4.5 with. Some are traced and some are not. I took thread dumps and there is a small difference that I don't understand.

This is being traced:

```auto
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
my code here

```

This is not being traced:

```auto
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
	at org.springframework.ws.transport.http.HttpComponentsConnection.onSendAfterWrite(HttpComponentsConnection.java:121)

```

The odd difference is that the non-working code (not traced by Elastic APM) has that frame for CloseableHttpClient:55. Unless I'm looking at the wrong source, line 55 is the @ThreadSafe annotation on the class. Everything above CloseableHttpClient.java:107 in both stacks is identical.

Any idea what's going on?

thanks

---

<div class="post-metadata">

**Author:** ![johngregg](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@johngregg](https://discuss.elastic.co/u/johngregg)\
**Post date:** [September 25, 2023, 3:11pm UTC](https://discuss.elastic.co/t/backend-calls-not-being-traced/343657/2 "2023-09-25T15:11:08Z")

</div>

FWIW, I think the CloseableHttpClient line 55 frame is a red herring. I looked at more thread dumps and see this frame in some backend calls that are showing up in the dependencies list.

I also increased the sampling rate to 1 but don't see any in what backend are being traced.
