# Invalid transaction names in APM UI with Java Agent

**URL:** <https://discuss.elastic.co/t/invalid-transaction-names-in-apm-ui-with-java-agent/170536>\
**Category:** APM\
**Created:** [March 1, 2019, 4:50pm UTC](https://discuss.elastic.co/t/invalid-transaction-names-in-apm-ui-with-java-agent/170536 "2019-03-01T16:50:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![remmeier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/remmeier/32/40420_2.png) [@remmeier](https://discuss.elastic.co/u/remmeier)\
**Post date:** [March 1, 2019, 4:50pm UTC](https://discuss.elastic.co/t/invalid-transaction-names-in-apm-ui-with-java-agent/170536/1 "2019-03-01T16:50:52Z")

</div>

**Kibana version** :

6.6.1

**Elasticsearch version** :

6.6.1

**APM Server version** :

6.6.1

**APM Agent language and version** :

Java, 1.4.0

**Browser version** :

firefox, chrome

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:

helm chart

**Fresh install or upgraded from other version?**

fresh

\*\*Description of the problem \*\*:

I have Elastic, APM and Agent running all fine. Java Servlet and JDBC calls get traced and in the transaction details I can see all the details like method, url, sql query, etc.

However the transaction timeline does not look like:

[https://www.elastic.co/guide/en/kibana/6.7/spans.html](https://www.elastic.co/guide/en/kibana/6.7/spans.html)

In the timeline on the example screenshot I can see the basics of the issued query or the path of the queried HTTP endpoint. In my running application I only see "GET" for HTTP calls and "SELECT" for JDBC calls.

If I switch to the APM -\> myService -\> transaction page I see only two entries:

- OperationHandler#handle
- GET

The former is a Spring Boot Actuator request it was not able to identify. And GET contains all GET requests. In contrast

[https://www.elastic.co/guide/en/kibana/6.7/transactions.html](https://www.elastic.co/guide/en/kibana/6.7/transactions.html)

has a nice list of the various paths where there are transaction names like "GET /api/stats".

Any ideas what could be wrong with my setup?

Thx, Remo

---

<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:** [March 1, 2019, 5:44pm UTC](https://discuss.elastic.co/t/invalid-transaction-names-in-apm-ui-with-java-agent/170536/2 "2019-03-01T17:44:49Z")

</div>

Hi and thanks for your question.

The Java agent uses the HTTP method name as a fallback transaction name whenever it can't determine a more appropriate one. If the request is handled by a Spring MVC controller, the transaction name is `ControllerClassName#methodName`. If the request is handled by a `javax.servlet.Servlet`, it is named `ServletClass#doGet`, for example. How does your architecture look like? Where do you handle your requests?

Another option which might be appropriate in your case is to use the [URL path as the transaction name](https://www.elastic.co/guide/en/apm/agent/java/current/config-http.html#config-use-path-as-transaction-name). Be aware of the caveats though.

I hope this helps 🙂

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![remmeier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/remmeier/32/40420_2.png) [@remmeier](https://discuss.elastic.co/u/remmeier)\
**Post date:** [March 4, 2019, 3:11pm UTC](https://discuss.elastic.co/t/invalid-transaction-names-in-apm-ui-with-java-agent/170536/3 "2019-03-04T15:11:42Z")

</div>

Hi Felix

Thx for the configuration pointers! All makes sense. We make use of [http://www.crnk.io/](http://www.crnk.io/) for regular rest calls. In the end it is a servlet processing the requests. We now set the span name on our own accounting for the issues with IDs in URLs.

For Spring Boot Actuators I guess it would be something useful to support out-of-the-box. In our case they get called frequently by Kubernetes to perform health checks.

Thx, Regards Remo

---

<div class="post-metadata">

**Author:** ![remmeier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/remmeier/32/40420_2.png) [@remmeier](https://discuss.elastic.co/u/remmeier)\
**Post date:** [March 5, 2019, 3:57pm UTC](https://discuss.elastic.co/t/invalid-transaction-names-in-apm-ui-with-java-agent/170536/4 "2019-03-05T15:57:25Z")

</div>

I created [https://github.com/elastic/apm-agent-java/issues/513](https://github.com/elastic/apm-agent-java/issues/513) to may have some Spring Boot Actuator support out of the box. Seems something useful for anyone.

Thx for the help!

---

<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:** [March 26, 2019, 11:57am UTC](https://discuss.elastic.co/t/invalid-transaction-names-in-apm-ui-with-java-agent/170536/5 "2019-03-26T11:57:34Z")

</div>

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