NoSuchElementException when SQS receiver throws an Exception

APM Agent language and version:

Java - 1.35.0

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

Error happens when an Exception is thrown when method called from an AWS SQS receiver

Steps to reproduce:

  1. Receive a SQS message from AWS
  2. Throw an Exception

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

at java.base/java.util.ArrayDeque.removeFirst(Unknown Source)
at java.base/java.util.ArrayDeque.remove(Unknown Source)
at co.elastic.apm.agent.impl.ActiveStack.deactivate(
at co.elastic.apm.agent.impl.ElasticApmTracer.deactivate(
at co.elastic.apm.agent.impl.transaction.AbstractSpan.deactivate(
at co.elastic.apm.agent.concurrent.RunnableCallableForkJoinTaskInstrumentation$AdviceClass.onExit(
at java.base/ Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
at java.base/ Source)

Thanks, I'm looking into this

Please try with this snapshot (PR) - please try both with and without throwing the exception and check that you get the APM transaction displayed in the UI you expect in each situation (assuming there is a transaction here, if not please tell me that is not a relevant aspect). Thanks

How fast Jack!

Great, I'll update the agent and update the topic soon.


Actually we have a higher level bug fix, so if you could try this snapshot from this PR, that would be better. Thanks

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