apm-agent-java: JMS message beans doesn't contain elastic apm logging
We upgraded our Spring Boot and Openliberty services to Java 17 and Spring Boot 3. What we’ve noticed is that the message beans for openliberty and spring boot (JMS) are not instrumenting the elasticsearch properties into the the logging. The rest-api’s are logging correctly the elastic properties. We’ve also tried to print the trace id in our application by ourself with “ElasticApm.currentTransaction().getTraceId()”. This is giving us an empty value.
So are we missing something in the configuration, because of the upgrade? We need the transaction and trace id in the logging.
The version we use is 1.39.0.
Our properties:
elastic.apm: environment: dev service-name: apm-test-logging server-url: https://test:8200 verify-server-cert: false enable-log-correlation: true log-format-sout: json application-packages: nl.test central_config: false
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 29 (16 by maintainers)
@LeaTaka I’ve tested the log sending locally and its working as expected on my side, could you try it with the latest release 1.39.0 and see if you have something in the “Observability > Logs > Log Stream” view in Kibana ? (here you might miss the trace correlation, but it should still be part of the global log stream, or even the per-service stream). If you still experience any issue here I would suggest we discuss this further in the forum or by creating another bug report as it seems to be a separate issue from the JMS support this issue is about.
Hi @LeaTaka you can subscribe to the notifications to know when #3198 is merged and when a new release is available.
Hi @LeaTaka and @marinkton , we have fixed a few issues in the PR that adds support for Jakarta namespace.
Could you try with this snapshot of the Java agent and see if that now works as expected ?
Thanks to the sample application provided by @LeaTaka I’ve managed to reproduce the issues locally which really helped a lot. There are still few test failures to investigate in the PR, but that’s only due to unit-testing.
Hi there, same problem here. I would like to contribute with my experience on the issue 👇
Tested;
Results:
*Please find attached the example project I used for testing. Also have a look at the example folder for the used configurations in the attached jms-logcorrelation-example-project.zip