Good evening everyone,
I was able to set up the APM Java Agent and activated the log_correlation option without further issues.
Next, I got the tool to log into a file by using the ECS Java Logging tool and its standard settings for log4j (configure a file and log appender and add those to the rootLogger).
My Java tool is able to execute Groovy Scripts, which can be configured on runtime. As the Groovy framework has not been implemented yet, I added a monitored method to the APM Java Agent
org.groovyrunner.AbstracScript#runScript, so now I am able to see the span from within APM.
Now I’d like to see any log entries generated within this span. For this, I instantiate a Logger within my Groovy code and log an info message. Right after, I see how the entry gets sent to Elasticsearch but the fields trace.id and transaction.id are nowhere to be found.
Is there anything else I can do on my side to get this running? I have no possibility to modify the source code of the Java app or Groovy library. I can only edit the Scripts and change the configuration of the Elastic Stack.
I’d appreciate any hints and I can also provide configuration files upon request.
P.S. in case you wonder the Java app is Jira and the Groovy tool is called ScriptRunner for Jira.