Using the java agent on some short lived (10-20s) services. Not seeing any data in the UI. Am wondering what the minimum amount of data needed to show up in the browser.
The typical harvest cycle of APM Agents is once every 60 seconds. So, when processes are only live for 10-20 seconds, they are shut down (and the agent is shut down) before that harvest cycle is reached and data is sent.
You can work around this with the
send_data_on_exit setting. As part of that, you’ll need to ensure the
send_data_on_exit_threshold is set to a time lower than your 20s max run time. 0 will work for really quick processes.
send_data_on_exit: true send_data_on_exit_threshold: 0
Let me know if that helps
Ive added these params:
updated - according to the logs the agent is sending data - but nothing is showing up in the ui
Hey @jon.yeargers1 -
Can you share a link the app that is not reporting? I’d love to take a look and see if I can gather any more clues.
(and welcome to the community too!)
Thank you! I checked out the application above and I am seeing classes being loaded, but it does look like we’re not capturing the transactions. Probably because they are shorted lived, as was mentioned before. Have you tried Java Custom Instrumentation and the @Trace API? That might do the trick to capture those transactions.
More info can be found here: https://docs.newrelic.com/docs/agents/java-agent/custom-instrumentation/java-custom-instrumentation
I hope that helps!