Request Tracing in Payara Micro
Originally published on 13 Jun 2024
Last updated on 13 Jun 2024

In a previous blog post, we explored the benefits of using Request Tracing in Payara Server. Payara Micro streamlines the configuration process, allowing you to tailor request tracing directly through command-line options. Let's have a look at how you can customize this tool for your Payara Micro applications.
The Core Options
- enableRequestTracing: This is the main switch for activating the Request Tracing Service. You can optionally include a time threshold value and unit with this flag. For example, --enableRequestTracing 500ms will enable tracing on requests taking longer than 500 milliseconds.
- requestTracingThresholdUnit and requestTracingThresholdValue: Use these to explicitly define your desired time unit (e.g., SECONDS, MINUTES, NANOSECONDS) and the numerical threshold value that triggers tracing.
- enable/requesttracingadaptivesampling...: Adaptive sampling offers a dynamic way to manage tracing. When enabled, Payara Micro will automatically adjust how many requests get traced, aiming to maintain a target count of traces over a period of time. You can further customize this behavior with the accompanying options.
Quick Tip: Shorthand Configuration For faster adjustments, combine the --enableRequestTracing flag with your desired threshold value and unit in a single string. Example: java -jar payara-micro.jar --enableRequestTracing 2s
Need More Control?
For the most granular configuration, you can use post-boot command files. These files allow you to execute the same set of asadmin commands used to manage the Request Tracing Service in Payara Server, giving you full access to all available settings.
Reference the Docs
Download Payara Micro Community and head over to the Payara Micro Request Tracing documentation, for a detailed breakdown of configuration options, and examples to guide your setup. Happy Tracing!
Related Posts
The Payara Monthly Catch - March 2025
Published on 31 Mar 2025
by Nastasija Trajanova
0 Comments
Join our webinar! Deploying Jakarta EE Applications with Payara Server and Payara Cloud
Published on 18 Mar 2025
by Dominika Tasarz
0 Comments
Join us for the webinar with the Java Champion Mike Redlich, where you'll discover how Payara Server and Payara Micro support mission-critical deployments, and see firsthand how Payara Cloud simplifies running Jakarta EE applications in the ...