Error logs not coming in for @Async method in using Java APM agent for SpringBoot application

I have configured the java APM agent through the elastic.apm.service_name config for my spring-boot application.


When there is any error occurring for my method annotated with @Async the error from this isn't available at the APM side. The code snippet where this issue occurs is.

 @Async("AsyncConfigPayAgg")
    public void submitPaymentToComplianceAndUpdateNano(PaymentDetails paymentDetails, Customer customer,
            List<RuleResponse> ruleResponseList) {
        try {
            LogUtil.log(LOGGER, "Active threads for comply::" + asyncConfigPayAgg.getActiveCount());
            APIResponse<?> compliResponse = submitTransactionForCompliance(paymentDetails,
                    PaymentDirectionEnum.OUTGOING, customer, ruleResponseList);

Sorry, I may be misunderstanding here. The agent doesn't get loaded just be setting the service name, it needs more setup. Have you configured your applications to run with the agent?