Java agent warns of improper deactivation of span

Hi and thanks a lot for the great feedback and the detailed description :slight_smile:!

I would say that many of the symptoms you describe seem to be related to incorrect management of span/transaction lifecycle. For example, getting empty span name and all zeros may be due to using an already recycled span/transaction.
Indeed, your code seems to activate the transaction on the thread without deactivating it. You either need to keep the Scope instance returned by invoking activate() and manually close() it, or use it within a try-with-resources statement, as explained in the relevant documentation.

I would also advice that you carefully choose where you end the async Apache client spans- make sure it is only ended once and by the correct thread.
Note that we already have an issue to properly trace the HTTP client async and our intentions are to get to it pretty soon, so you may want to wait for it.

I hope this is helpful,
Eyal.