# Elastic APM Java - Transactions & Spans are recorded but not reported to Elastic APM Server or Kibana

**URL:** <https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505>\
**Category:** APM\
**Tags:** java, ui\
**Created:** [July 1, 2020, 2:33pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505 "2020-07-01T14:33:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Debashish\_BHARALI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashish_bharali/32/71479_2.png) [@Debashish\_BHARALI](https://discuss.elastic.co/u/Debashish_BHARALI)\
**Post date:** [July 1, 2020, 2:33pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/1 "2020-07-01T14:33:15Z")

</div>

I have a standalone JAVA application.  
  
And have integrated it successfully with Elastic APM (+ElasticSearch +Kibana) for capturing telemetries.

**Java Version:** 8 - OpenJDK  
  
**Elastic Agent & Library Version:** 1.16  
  
**Elastic Search, APM and Kibana Version:** 7.7.1

Below are the relevant JVM Options being used:

```auto
JAVA_OPTS="$JAVA_OPTS -javaagent:$BASE_HOME/agent-lib/elastic-apm-agent-1.16.0.jar -Delastic.apm.service_name=my-app -Delastic.apm.server_urls=http://elastic-apm-server:8200"
JAVA_OPTS="$JAVA_OPTS -Delastic.apm.application_packages=com,org -Delastic.apm.span_frames_min_duration=-1ms"
JAVA_OPTS="$JAVA_OPTS -Delastic.apm.log_file=$BASE_HOME/logs/apm.log -Delastic.apm.log_level=DEBUG"

```

- I am generating custom transactions and spans using the Tracer/Transaction/Span APIs as suggested in the [official documentation](https://www.elastic.co/guide/en/apm/agent/java/1.x/public-api.html).
- And as per the generated debug logs. These spans and transactions are getting captured as expected.
- I have validated the same by DEBUGGING it over the IDE, that transactions are being captured as expected.

# Problem: The custom transactions are not shown on the Kibana APM Dashboard

However some out of the box transactions from Quartz(which is being used in the application) are shown as expected. Which should mean the integration with the Elastic APM Server is fine.

It appears to me, even though the transactions are being captured successfully, those are not reported(sent) to the APM Server

**Refer some relevant apm logs:**

```auto
2020-07-01 12:33:09.569 [pool-1-thread-1] DEBUG co.elastic.apm.agent.impl.ElasticApmTracer - startTransaction '' 00-d0025079170e4f03698702f4e68be4ac-cf792454fbef1c77-01 (16970dc3) {
2020-07-01 12:33:09.569 [pool-1-thread-1] DEBUG co.elastic.apm.agent.impl.ElasticApmTracer - Activating 'ExtractionRequestHandler#invokeExtraction' 00-d0025079170e4f03698702f4e68be4ac-cf792454fbef1c77-01 (16970dc3) on thread 26
2020-07-01 12:33:09.569 [pool-1-thread-1] DEBUG co.elastic.apm.agent.impl.transaction.AbstractSpan - increment references to 'ExtractionRequestHandler#invokeExtraction' 00-d0025079170e4f03698702f4e68be4ac-cf792454fbef1c77-01 (16970dc3) (2)
2020-07-01 12:33:09.569 [elastic-apm-server-reporter] DEBUG co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Receiving SPAN event (sequence 86)
2020-07-01 12:33:09.570 [elastic-apm-server-reporter] DEBUG co.elastic.apm.agent.impl.transaction.AbstractSpan - decrement references to 'ExtractionRequestHandler#invokeExtraction' 00-98a1d8f4970d585915eb03a414b7b14c-994dd2823198f1ef-01 (33d448b5) (4)
2020-07-01 12:33:09.570 [elastic-apm-server-reporter] DEBUG co.elastic.apm.agent.impl.transaction.AbstractSpan - decrement references to 'BOpFileUtils#authorizeFilePath' 00-98a1d8f4970d585915eb03a414b7b14c-133200d1793fbaab-01 (67fba8aa) (0)
2020-07-01 12:33:09.570 [elastic-apm-server-reporter] DEBUG co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Receiving SPAN event (sequence 87)
2020-07-01 12:33:09.570 [elastic-apm-server-reporter] DEBUG co.elastic.apm.agent.impl.transaction.AbstractSpan - decrement references to 'ExtractionRequestHandler#invokeExtraction' 00-98a1d8f4970d585915eb03a414b7b14c-994dd2823198f1ef-01 (33d448b5) (3)
2020-07-01 12:33:09.570 [elastic-apm-server-reporter] DEBUG co.elastic.apm.agent.impl.transaction.AbstractSpan - decrement references to 'SCR#init' 00-98a1d8f4970d585915eb03a414b7b14c-77cf207c33eb24ab-01 (2f1f25c3) (0)

```

  

# Need help in finding what I am doing wrong? And how to fix it?

---

<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:** [July 1, 2020, 2:54pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/2 "2020-07-01T14:54:00Z")

</div>

Hi and welcome to the forum 👋

You might have to select a different transaction type here:

 ![apm-transactions-overview](https://us1.discourse-cdn.com/elastic/original/3X/1/d/1d9c4632a9688e88725a36b8c400a14826650b6f.png)

---

<div class="post-metadata">

**Author:** ![Debashish\_BHARALI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashish_bharali/32/71479_2.png) [@Debashish\_BHARALI](https://discuss.elastic.co/u/Debashish_BHARALI)\
**Post date:** [July 1, 2020, 2:59pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/3 "2020-07-01T14:59:09Z")

</div>

Thanks a ton @felixbarny.

That was the problem.  
I wasted many hours on this.

In my case, the TYPE in which all my custom transactions are coming is with name 'Custom'.  
Can we somehow change the type somewhere?

---

<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:** [July 1, 2020, 3:35pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/4 "2020-07-01T15:35:32Z")

</div>

Sorry for the inconvenience. You can use the API to override the type.  
Or are you suggesting the default should be different?  
I’m also wondering whether the UI should just show all types by default with the option to select only specific ones. What do you think?

---

<div class="post-metadata">

**Author:** ![Debashish\_BHARALI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashish_bharali/32/71479_2.png) [@Debashish\_BHARALI](https://discuss.elastic.co/u/Debashish_BHARALI)\
**Post date:** [July 1, 2020, 3:58pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/5 "2020-07-01T15:58:18Z")

</div>

> [@felixbarny](#):
>
> What

Default value of Custom is perfect.  
It was my fault that I did't go through the drop down.

API to override? --\> are you pointing to span.setType()? If yes, I observed that is deprecated.

Yes I agree. Personally, as a user, I think following should be there:

1. User should be able to select a default filter. I.e. Any of the available filter can be marked as default for the user (user account for which it is logged in)
2. For the selected default filter (currently Transaction Type), X numbers of available options should be visible (may be 5 or 10) [may be with pagination]
3. Even the default filter (currently Transaction Type) should be a multi-select like Host, Container ID etc

---

<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:** [July 1, 2020, 4:52pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/6 "2020-07-01T16:52:31Z")

</div>

It would be [`Transaction.setType`](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-transaction-set-type)

---

<div class="post-metadata">

**Author:** ![Debashish\_BHARALI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashish_bharali/32/71479_2.png) [@Debashish\_BHARALI](https://discuss.elastic.co/u/Debashish_BHARALI)\
**Post date:** [July 1, 2020, 4:53pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/7 "2020-07-01T16:53:57Z")

</div>

@felixbarny Got it.

---

<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:** [July 1, 2020, 4:55pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/8 "2020-07-01T16:55:05Z")

</div>

> [@Debashish\_BHARALI](#):
>
> Yes I agree. Personally, as a user, I think following should be there:
> 
> 1. User should be able to select a default filter. I.e. Any of the available filter can be marked as default for the user (user account for which it is logged in)
> 2. For the selected default filter (currently Transaction Type), X numbers of available options should be visible (may be 5 or 10) [may be with pagination]
> 3. Even the default filter (currently Transaction Type) should be a multi-select like Host, Container ID etc

That’s great feedback for the UI team!  
cc @sqren

---

<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:** [July 22, 2020, 12:55pm UTC](https://discuss.elastic.co/t/elastic-apm-java-transactions-spans-are-recorded-but-not-reported-to-elastic-apm-server-or-kibana/239505/9 "2020-07-22T12:55:19Z")

</div>

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