# No transactions for Apache HTTPClient

**URL:** https://discuss.elastic.co/t/no-transactions-for-apache-httpclient/217235
**Category:** APM
**Tags:** java
**Created:** [January 30, 2020, 3:51pm UTC](https://discuss.elastic.co/t/no-transactions-for-apache-httpclient/217235 "2020-01-30T15:51:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)
#### Post date: [January 30, 2020, 3:51pm UTC](https://discuss.elastic.co/t/no-transactions-for-apache-httpclient/217235/1 "2020-01-30T15:51:08Z")

</div>

I'd like to get HTTPClient spans (transactions) into APM:

```auto
    -javaagent:c:/path-to-jar/elastic-apm-agent-1.12.0.jar ^
    -Delastic.apm.service_name=HTTP-Service ^
    -Delastic.apm.server_url=http://localhost:8200 ^
    -Delastic.apm.secret_token= ^
    -Delastic.apm.application_packages=org.apache,com.someother ^

```

According to the documentation:

> the agent automatically creates spans for outgoing HTTP requests and propagates tracing headers.

But I'm getting JVM stats, and no transactions in Kibana.  
Am I missing something?

Thanks!

**OS** : Windows 10

**httpclient version** : 4.5.3

**Kibana version** : 7.5.2

**Elasticsearch version** : 7.5.2

**APM Server version** : 7.5.2

**APM Agent language and version** : java 1.12.0

---

<div class="post-metadata">

### Author: ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)
#### Post date: [January 30, 2020, 4:10pm UTC](https://discuss.elastic.co/t/no-transactions-for-apache-httpclient/217235/2 "2020-01-30T16:10:16Z")

</div>

Hi and thanks for your question!

Which (web) framework are you using? Note that we only create spans if there's a transaction. So make sure you either use a supported web framework or to manually create a transaction.

See also the troubleshooting guide: [https://www.elastic.co/guide/en/apm/agent/java/current/trouble-shooting.html](https://www.elastic.co/guide/en/apm/agent/java/current/trouble-shooting.html)

---

<div class="post-metadata">

### Author: ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)
#### Post date: [January 31, 2020, 11:38am UTC](https://discuss.elastic.co/t/no-transactions-for-apache-httpclient/217235/3 "2020-01-31T11:38:23Z")

</div>

Thank you for getting back!  
I use a custom java app, which includes HTTPclient libraries. I thought, the APM agent could magically capture the stats from the http client 🙂 , according to [this](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html#supported-networking-frameworks):

> For the supported HTTP libraries, the agent automatically creates spans for outgoing HTTP requests and propagates tracing headers. The spans are named after the schema `<method> <host>` , for example `GET elastic.co` .

Using that terminology `Apache HttpClient` **is** a framework, isn't it?

Is there a technical documentation about APM integration into external frameworks?  
I'm trying to understand, how all these _transaction_ and _span_ stuff is working.  
E.g. when some web-frameworks are supported: does that mean, that their owners have extended (added APM-related code) into the frameworks?  
Thanks a lot!

---

<div class="post-metadata">

### Author: ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)
#### Post date: [January 31, 2020, 12:53pm UTC](https://discuss.elastic.co/t/no-transactions-for-apache-httpclient/217235/4 "2020-01-31T12:53:11Z")

</div>

> [@jetnet](#):
>
> I thought, the APM agent could magically capture the stats from the http client 🙂 , according to [this](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html#supported-networking-frameworks):

Yes, it can do that but only if the http request happens within the context of a transaction.

See also [Data Model | APM User Guide [8.11] | Elastic](https://www.elastic.co/guide/en/apm/get-started/current/apm-data-model.html)

> [@jetnet](#):
>
> Is there a technical documentation about APM integration into external frameworks?  
> I'm trying to understand, how all these _transaction_ and _span_ stuff is working.  
> E.g. when some web-frameworks are supported: does that mean, that their owners have extended (added APM-related code) into the frameworks?

See [Frequently Asked Questions | APM Java Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/java/current/faq.html)

---

<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: [February 21, 2020, 9:05am UTC](https://discuss.elastic.co/t/no-transactions-for-apache-httpclient/217235/5 "2020-02-21T09:05:37Z")

</div>

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