<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JDK Flight Recorder on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/category/jdk-flight-recorder/</link><description>Recent content in JDK Flight Recorder on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 14 Nov 2025 10:13:04 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/category/jdk-flight-recorder/index.xml" rel="self" type="application/rss+xml"/><item><title>Micrometer &amp; Prometheus in Spring Boot: Kafka Burger Orders</title><link>https://foojayio.github.io/website/today/micrometer-prometheus-in-spring-boot-kafka-burger-orders/</link><pubDate>Fri, 14 Nov 2025 10:13:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/micrometer-prometheus-in-spring-boot-kafka-burger-orders/</guid><description>&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/eSreg0xPGqo?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;

&lt;br /&gt;
&lt;p&gt;👨‍💻 GitHub: &lt;a href="https://github.com/vinny59200/dukeburger" target="_blank" rel="noopener noreferrer"&gt;https://github.com/vinny59200/dukeburger&lt;/a&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;🔵⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪&lt;/p&gt;
&lt;p&gt;This guide shows how to use &lt;strong&gt;Micrometer and Prometheus in Spring Boot&lt;/strong&gt; to track a custom metric for a Kafka-driven Burger Orders app. You&amp;rsquo;ll post a burger order to a REST endpoint, publish it to Kafka, consume the topic, and increment a counter for all &amp;ldquo;DukeBurger&amp;rdquo; orders. Copy the snippets, run, and you&amp;rsquo;ll see your metric on &lt;code&gt;/actuator/prometheus&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Remotely Recording a JFR Log from a Container (Without Using the Command Line)</title><link>https://foojayio.github.io/website/today/remotely-recording-a-jfr-log-from-a-container-without-using-the-command-line/</link><pubDate>Tue, 07 May 2024 04:32:29 +0000</pubDate><guid>https://foojayio.github.io/website/today/remotely-recording-a-jfr-log-from-a-container-without-using-the-command-line/</guid><description>&lt;p&gt;Java Flight Recorder (JFR) is the go-to technology for recording and viewing JVM and system metrics.&lt;/p&gt;
&lt;p&gt;JFR records JFR logs which reveal much about the running application, the health of the JVM and the stability of the system. JFR logs are easily obtained by simply going into the command line / terminal and entering a few commands.&lt;/p&gt;
&lt;p&gt;But what if you don&amp;rsquo;t have access to the command line or terminal directly on the system where the JVM is running, like when the JVM is running in a container?&lt;/p&gt;</description></item><item><title>Do you trust profilers? I once did too!</title><link>https://foojayio.github.io/website/today/do-you-trust-profilers-i-once-did-too/</link><pubDate>Wed, 01 Mar 2023 13:14:06 +0000</pubDate><guid>https://foojayio.github.io/website/today/do-you-trust-profilers-i-once-did-too/</guid><description>&lt;p&gt;Profilers are great tools in your toolbox, like debuggers, when solving problems with your Java application (I&amp;rsquo;ve been &lt;a href="https://foojayio.github.io/website/today/foojay-podcast-14/"&gt;on a podcast on this topic&lt;/a&gt;
 recently).&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll tell you some of their problems and a technique to cope with them in this article.&lt;/p&gt;
&lt;p&gt;There are many open-source profilers, most notably JFR/JMC, and async-profiler, that help you to find and fix performance problems.&lt;/p&gt;
&lt;p&gt;But they are just software themselves, interwoven with a reasonably large project, the OpenJDK (or OpenJ9, for that matter), and thus suffer from the same problems as the typical problems of the applications they are used to profile:&lt;/p&gt;</description></item><item><title>JFR Timestamps and System.nanoTime Foojay.io</title><link>https://foojayio.github.io/website/today/jfr-timestamps-and-system-nanotime/</link><pubDate>Wed, 08 Feb 2023 15:33:34 +0000</pubDate><guid>https://foojayio.github.io/website/today/jfr-timestamps-and-system-nanotime/</guid><description>&lt;p&gt;Did you ever wonder whether JFR timestamps use the same time source as &lt;code&gt;System.nanoTime&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;This is important when you have miscellaneous logging besides JFR events; otherwise, you would not be able to match JFR events and your logging properly.&lt;/p&gt;
&lt;p&gt;We assume here that you use &lt;code&gt;System.nanoTime&lt;/code&gt; and not less-suited timing information from &lt;code&gt;System.currentTimeMillis&lt;/code&gt;&lt;strong&gt;()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The journey into this started with a question on the JDK Mission Control slack channel, which led me into a rabbit hole:&lt;/p&gt;</description></item><item><title>JFR Event Collection</title><link>https://foojayio.github.io/website/today/jfr-event-collection/</link><pubDate>Thu, 08 Dec 2022 10:08:52 +0000</pubDate><guid>https://foojayio.github.io/website/today/jfr-event-collection/</guid><description>&lt;p&gt;Ever wondered what all the JDK Flight Recorder events are, in which JDK versions they are supported, and what examples of an event looks like?&lt;/p&gt;
&lt;p&gt;Wonder no more, I created the &lt;a href="https://sapmachine.io/jfrevents" target="_blank" rel="noopener noreferrer"&gt;JFR Event Collection&lt;/a&gt;
 website which contains all this and more.
&lt;a href="https://sapmachine.io/jfrevents" target="_blank" rel="noopener noreferrer"&gt;&lt;img src="https://foojayio.github.io/website/today/jfr-event-collection/Screenshot-2022-12-05-at-18.01.21-1024x574.png" alt="Screenshot of https://sapmachine.io/jfrevents" loading="lazy"&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;This site gives you an up-to-date collection of all OpenJDK JFR events for every JDK since 11, giving you the following additional information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;configuration properties&lt;/li&gt;
&lt;li&gt;fields with their types and description&lt;/li&gt;
&lt;li&gt;examples from a renaissance benchmark run&lt;/li&gt;
&lt;li&gt;with which GC this event appears&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/parttimenerd/jfreventcollector/blob/main/additional.xml" target="_blank" rel="noopener noreferrer"&gt;additional descriptions&lt;/a&gt;
 collected by JFR users&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The idea for this website came during the development of my prototypical JFR UI:
&lt;img src="https://foojayio.github.io/website/today/jfr-event-collection/Screenshot-of-JFR-events-viewer-1024x447.png" alt="Screenshot of JFR events viewer" loading="lazy"&gt;
&lt;/p&gt;</description></item><item><title>Java Profiling Overview</title><link>https://foojayio.github.io/website/today/java-profiling-overview/</link><pubDate>Mon, 14 Nov 2022 09:14:25 +0000</pubDate><guid>https://foojayio.github.io/website/today/java-profiling-overview/</guid><description>&lt;p&gt;When I ask Java developers whether they do profile, the answer is usually &amp;ldquo;no&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The few that profiled before usually used VisualVM as a student and maybe JProfiler or YourKit years ago at work.&lt;/p&gt;
&lt;p&gt;One of the reasons for this is a lack of available information and thus knowledge for everyday Java developers.&lt;/p&gt;
&lt;p&gt;This is a pity as profiling should be a part of the tool belt for every experienced developer (not just for Java). The problem is that most of the open-source profilers are targeted to the OpenJDK developers (or their colleagues), even if they won&amp;rsquo;t admit it. This can be seen in the lack of entry-level material on this topic and even the little that is out there is distributed across multiple conference websites, blogs, YouTube channels, and Twitter accounts.&lt;/p&gt;</description></item><item><title>Thinking About Massive Throughput? Meet Virtual Threads!</title><link>https://foojayio.github.io/website/today/thinking-about-massive-throughput-meet-virtual-threads/</link><pubDate>Thu, 28 Apr 2022 07:41:25 +0000</pubDate><guid>https://foojayio.github.io/website/today/thinking-about-massive-throughput-meet-virtual-threads/</guid><description>&lt;p&gt;The goal of this article is to examine known facts about an upcoming Java threading model extension.&lt;/p&gt;
&lt;p&gt;No, no-worries, the current Java threading model remains but behind the curtains something good is already knocking on the virtual door.&lt;/p&gt;
&lt;p&gt;Yes, we are talking about JEP-425: Virtual Threads.&lt;/p&gt;
&lt;h2 id="h2-0-knocking-on-current-concurrency-limits"&gt;Knocking on current concurrency limits&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s first look at the current Java threading model. It provides an implementation of the Thread class. A Thread can be considered a Java concurrency unit which can execute so-called &lt;em&gt;Runnable&lt;/em&gt; tasks. The instance of a Thread class is also an object but there is a bit more happening behind the scenes.&lt;/p&gt;</description></item><item><title>Monitoring Spring Boot Applications (Part 1)</title><link>https://foojayio.github.io/website/today/monitoring-spring-boot-applications-part-1/</link><pubDate>Wed, 12 Jan 2022 16:34:53 +0000</pubDate><guid>https://foojayio.github.io/website/today/monitoring-spring-boot-applications-part-1/</guid><description>&lt;blockquote&gt;
&lt;p&gt;In part 1 of this series, we will learn about JDK Flight Recorder and how we can use it to monitor a Spring Boot application.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="h3-0-introduction"&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Application monitoring is one thing that we as developers cannot overlook. It doesn&amp;rsquo;t matter if you run a monolith or microservices application because application monitoring is a must for production workloads to know what&amp;rsquo;s happening with your application. If you are using Spring Boot, there are different ways to monitor an application. The most popular way to monitor a Spring Boot application is to enable the &lt;a href="https://github.com/spring-projects/spring-boot/tree/v2.6.0/spring-boot-project/spring-boot-actuator" target="_blank" rel="noopener noreferrer"&gt;spring-boot-actuator&lt;/a&gt;
 module to achieve the desired result.&lt;/p&gt;</description></item><item><title>Contributing to OpenJDK Mission Control</title><link>https://foojayio.github.io/website/today/contributing-to-openjdk-mission-control/</link><pubDate>Mon, 18 Oct 2021 08:33:12 +0000</pubDate><guid>https://foojayio.github.io/website/today/contributing-to-openjdk-mission-control/</guid><description>&lt;p&gt;Since this month is &lt;a href="https://hacktoberfest.digitalocean.com/" target="_blank" rel="noopener noreferrer"&gt;Hacktoberfest&lt;/a&gt;
, I thought it would be a good idea to talk a bit about how to contribute to the OpenJDK Mission Control project.&lt;/p&gt;
&lt;p&gt;Some of the content of this article will be applicable to any of the OpenJDK projects, especially the Skara (OpenJDK on Git) bits.&lt;/p&gt;
&lt;h2 id="h2-0-the-openjdk-mission-control-project"&gt;The OpenJDK Mission Control Project&lt;/h2&gt;
&lt;p&gt;The OpenJDK Mission Control project is the observability tools suite for OpenJDK. It contains a JMX Console, a JFR visualizer and analyzer, a heap waste analysis tool, and many other little useful tools and utilities. Since it is all open source, pretty much anyone can contribute to the project.&lt;/p&gt;</description></item><item><title>On The Costs of Hidden Logging</title><link>https://foojayio.github.io/website/today/the-costs-of-hidden-logging/</link><pubDate>Mon, 11 Oct 2021 08:05:33 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-costs-of-hidden-logging/</guid><description>&lt;p&gt;A while ago I received a customer escalation ticket regarding performance degradation when using &lt;a href="https://docs.datadoghq.com/tracing/profiler/" target="_blank" rel="noopener noreferrer"&gt;Datadog Continuous Profiler for Java&lt;/a&gt;
. The degradation was observable as an increased CPU usage as well as unexpected latency.&lt;/p&gt;
&lt;h2 id="h2-0-the-beginning-unusual-customer-escalation"&gt;The Beginning: Unusual Customer Escalation&lt;/h2&gt;
&lt;p&gt;To bootstrap the troubleshooting, I usually try to isolate the area which might be causing the regression.&lt;/p&gt;
&lt;p&gt;The profiler is packaged as a Java agent and for ease of use it is bundled together with the Datadog Java tracer agent. The profiler itself uses JDK Flight Recorder (JFR) under the hood.&lt;/p&gt;</description></item><item><title>Announcement: JMC 8.0.1 Has Been Released!</title><link>https://foojayio.github.io/website/today/jmc-8-0-1-released/</link><pubDate>Fri, 25 Jun 2021 18:10:26 +0000</pubDate><guid>https://foojayio.github.io/website/today/jmc-8-0-1-released/</guid><description>&lt;p&gt;The &lt;a href="https://github.com/openjdk/jmc/releases/tag/8.0.1-ga" title="8.0.1-ga" target="_blank" rel="noopener noreferrer"&gt;8.0.1-ga&lt;/a&gt;
 tag was just set in the jmc8 repository on GitHub. This is a patch update release, and will therefore not include any new features.&lt;/p&gt;
&lt;p&gt;The 8.0.1 release contains the following fixes:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Jira Issue&lt;/th&gt;
					&lt;th&gt;Summary&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;7188&lt;/td&gt;
					&lt;td&gt;JMC fails to dump file and gets stuck when flightrecording is attempted on jmxremote connection&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;7172&lt;/td&gt;
					&lt;td&gt;Fix spell mistake in secure store class&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;6920&lt;/td&gt;
					&lt;td&gt;UI improvements&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;6336&lt;/td&gt;
					&lt;td&gt;Remove Triple DES Cipher in Secure store&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;6398&lt;/td&gt;
					&lt;td&gt;Better JNDI Usage&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;It is up to individual vendors to release binaries of JMC 8.0.1, and some vendors already have binary builds available, for example &lt;a href="https://jdk.java.net/jmc/8/" title="Oracle" target="_blank" rel="noopener noreferrer"&gt;Oracle&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>OpenJDK and the Future of Production Profiling</title><link>https://foojayio.github.io/website/today/openjdk-and-the-future-of-production-profiling/</link><pubDate>Thu, 24 Jun 2021 08:46:28 +0000</pubDate><guid>https://foojayio.github.io/website/today/openjdk-and-the-future-of-production-profiling/</guid><description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Some thoughts on the future of continuous production profiling on the OpenJDK platform.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A long time ago, the JRockit Runtime Analyzer (JRA) was introduced into the JRockit JVM as a means of being able to figure out what was going on in the JVM. It was mainly there to find out how customers were using the JVM, so that the JVM could be optimized for actual real-world production work-loads. The JRA output the data as XML, since customers insisted on the data being human readable so that they could see exactly what they would be sending us. Later LAT (LATency Analyzer) was introduced, since after the introduction of the JRockit low latency garbage collector (a.k.a the DetGC), some customers complained about the GC not keeping its latency promises. More often than not, it turned out it was other kinds of thread stalls causing the latencies, so LAT was introduced so that the JRockit team could figure out where the problematic code was. Since there could be a considerable amount of data in LAT, a binary format was introduced for the events recorded.&lt;/p&gt;</description></item><item><title>Towards Continuous Performance Regression Testing</title><link>https://foojayio.github.io/website/today/towards-continuous-performance-regression-testing/</link><pubDate>Thu, 25 Feb 2021 09:44:43 +0000</pubDate><guid>https://foojayio.github.io/website/today/towards-continuous-performance-regression-testing/</guid><description>&lt;p&gt;Functional unit and integration tests are a standard tool of any software development organization, helping not only to ensure correctness of newly implemented code, but also to identify regressions &amp;mdash; bugs in existing functionality introduced by a code change. The situation looks different though when it comes to regressions related to non-functional requirements, in particular performance-related ones: How to detect increased response times in a web application? How to identify decreased throughput?&lt;/p&gt;</description></item><item><title>Improved JFR Allocation Profiling in JDK 16</title><link>https://foojayio.github.io/website/today/improved-jfr-allocation-profiling-in-jdk-16/</link><pubDate>Wed, 17 Feb 2021 09:46:33 +0000</pubDate><guid>https://foojayio.github.io/website/today/improved-jfr-allocation-profiling-in-jdk-16/</guid><description>&lt;p&gt;JFR (JDK Flight Recorder) has been providing the support for on-the fly allocation profiling for a while with the help of &lt;strong&gt;ObjectAllocationInNewTLAB&lt;/strong&gt; and &lt;strong&gt;ObjectAllocationOutsideTLAB&lt;/strong&gt; events.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Short excursion - what is TLAB?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;TLAB stands for Thread Local Allocation Buffer and it is a region inside Eden, which is exclusively assigned to a thread. Each thread has its own TLAB. Thanks to that, as long as objects are allocated in TLABs, there is no need for any type of synchronization. Allocation inside TLAB is a simple pointer bump (that&amp;rsquo;s why it&amp;rsquo;s sometimes called pointer bump allocation).&lt;/p&gt;</description></item><item><title>The SolarWinds Hack for Java Developers</title><link>https://foojayio.github.io/website/today/the-solarwinds-hack-for-java-developers/</link><pubDate>Tue, 09 Feb 2021 07:39:53 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-solarwinds-hack-for-java-developers/</guid><description>&lt;p&gt;In December 2020, an advanced persistent threat attacked many companies by &lt;a href="https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html" target="_blank" rel="noopener noreferrer"&gt;injecting malicious code into a vendor application&lt;/a&gt;
 that belonged to SolarWinds. This technique is called a &amp;ldquo;supply chain attack,&amp;rdquo; because instead of targeting the victim directly, the attacker damaged something higher up the supply chain and simply waited. The US government uses SolarWinds, so by attacking SolarWinds in a way that would infiltrate the US government, the attacker effectively got their target.&lt;/p&gt;</description></item><item><title>How &amp; When to Use JDK Flight Recorder in Production</title><link>https://foojayio.github.io/website/today/how-when-to-use-jdk-flight-recorder-in-production/</link><pubDate>Tue, 15 Dec 2020 12:44:28 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-when-to-use-jdk-flight-recorder-in-production/</guid><description>&lt;p&gt;While it would certainly be useful to record the whole lifetime, this is unpractical, even airplane Flight Data Recorders (and Cockpit Voice Recorders) only keep recent history. Instead, it&amp;rsquo;s possible to aim at specific time frames where a recording could be useful:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;At &lt;strong&gt;startup&lt;/strong&gt;, the JVM does a lot of things, so does the application, it generally initializes a lot of long lived objects, generally services, threads, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Continuously&lt;/strong&gt; at &lt;strong&gt;runtime&lt;/strong&gt; , this is likely a sliding time window in which one can access what&amp;rsquo;s happened in last &lt;em&gt;X &amp;lt;time unit&amp;gt;&lt;/em&gt;(this is either limited by age or by size). It this case the dump could be done when required.&lt;/li&gt;
&lt;li&gt;At &lt;strong&gt;shutdown&lt;/strong&gt; whether the JVM was &lt;strong&gt;killed&lt;/strong&gt; or &lt;strong&gt;crashed&lt;/strong&gt;. It this case the JFR files are an alternative to heap dumps for the autopsy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more details on this topic, see &lt;a href="https://foojayio.github.io/website/today/continuous-production-profiling-and-diagnostics/"&gt;Continuous Production Profiling and Diagnostics&lt;/a&gt;
, by Marcus Hirt.&lt;/p&gt;</description></item><item><title>Using Java Flight Recorder and Mission Control (Part 3)</title><link>https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-3/</link><pubDate>Thu, 19 Nov 2020 09:13:02 +0000</pubDate><guid>https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-3/</guid><description>&lt;p&gt;Continuing from &lt;a href="https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-1/"&gt;part 1&lt;/a&gt;
 and &lt;a href="https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-2/"&gt;part 2&lt;/a&gt;
, while from JDK 14 events can be consumed on the fly, previous JDK versions (from JDK 11) offer a public API useful enough to control Flight Recorder programmatically or to read events from a JFR file.&lt;/p&gt;
&lt;pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""&gt;Configuration c = Configuration.getConfiguration("profile"); [1]
Recording r = new Recording(c);
r.setName("monitor jvm");
r.enable("jdk.*"); [2]
r.setMaxAge(java.time.Duration.ofMinutes(4)); [3]
r.start(); [4]

// to be profiled

r.stop(); [5]
r.dump(Files.createFile("/var/log/jfr/app-initiated.jfr")); [6]&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;As shown above, choose the JFR configuration.&lt;/li&gt;
&lt;li&gt;Choose which events the recording should be interested in. Another signature accepts classes, it&amp;rsquo;s unlikely to be helpful for JDK events, but it may get interesting for custom events, your classes.&lt;/li&gt;
&lt;li&gt;Eventually set recording constraints, like the maximum age of the records.&lt;/li&gt;
&lt;li&gt;Hit record.&lt;/li&gt;
&lt;li&gt;When the recording session is over, stop JFR.&lt;/li&gt;
&lt;li&gt;Then store the results in the location of your choosing.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The above snippet creates a continuous profiling session with a 4 minute window.&lt;/p&gt;</description></item><item><title>Continuous Production Profiling and Diagnostics</title><link>https://foojayio.github.io/website/today/continuous-production-profiling-and-diagnostics/</link><pubDate>Mon, 09 Nov 2020 15:57:38 +0000</pubDate><guid>https://foojayio.github.io/website/today/continuous-production-profiling-and-diagnostics/</guid><description>&lt;p&gt;I&amp;rsquo;ve gotten a lot of questions about continuous production profiling lately. Why would anyone want to profile in production, or, if production profiling seems reasonable, why the heck leave it on continuously? I thought I&amp;rsquo;d take a few moments and share my take on the problem and the success I&amp;rsquo;ve seen the past years applying continuous production profiling in systems in the real world.&lt;/p&gt;
&lt;p&gt;Trigger warning: this blog will not contain code samples.&lt;/p&gt;</description></item><item><title>Using Java Flight Recorder and Mission Control (Part 2)</title><link>https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-2/</link><pubDate>Thu, 05 Nov 2020 16:50:59 +0000</pubDate><guid>https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-2/</guid><description>&lt;p&gt;Now, &lt;a href="https://foojayio.github.io/website/blog/using-java-flight-recorder-and-mission-control-part-1/"&gt;continuing from part 1&lt;/a&gt;
, to exploit the recording by analyzing it, we have a tool named &lt;code&gt;jfr&lt;/code&gt; that ships with the JDK. On Linux the &lt;em&gt;alternative&lt;/em&gt; jdk management may not be aware of &lt;code&gt;jfr&lt;/code&gt;, which means you may need to use the full path to this executable.&lt;/p&gt;
&lt;p&gt;The first interesting thing to do is to get an overview of the recording, the &lt;code&gt;summary&lt;/code&gt; sub-command displays an histogram of the events, shown below.&lt;/p&gt;</description></item><item><title>Using Java Flight Recorder and Mission Control (Part 1)</title><link>https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-1/</link><pubDate>Mon, 02 Nov 2020 09:49:11 +0000</pubDate><guid>https://foojayio.github.io/website/today/using-java-flight-recorder-and-mission-control-part-1/</guid><description>&lt;p&gt;Java Flight Recorder is the profiler you can use in production, continuously. Flight Recorder has been available before in the JDK, e.g., it shipped as part of the JDK 8, but to use it, it required that you set specific commercial VM flags to unlock Flight Recorder, this is not anymore necessary from Java 11 onwards.&lt;/p&gt;
&lt;p&gt;|&amp;mdash;|&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;-|
| | This page assumes JDK 11, that means there is no need to set &lt;code&gt;-XX:+UnlockCommercialFeatures&lt;/code&gt;, &lt;code&gt;-XX:+FlightRecorder&lt;/code&gt; flags. Or, more particular to JFR, the use of &lt;code&gt;-XX:+UnlockDiagnosticVMOptions&lt;/code&gt; and &lt;code&gt;-XX:+DebugNonSafepoints&lt;/code&gt; &lt;a href="https://github.com/openjdk/jmc/blob/bacb448fd4ed1a9a5d887c50aebff4e854d3512a/core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/version/JavaVersionSupport.java#L59-L60" target="_blank" rel="noopener noreferrer"&gt;source&lt;/a&gt;
 |&lt;/p&gt;</description></item><item><title>JmFrX: A Bridge From JMX to Java Flight Recorder</title><link>https://foojayio.github.io/website/today/introducing-jmfrx-a-bridge-from-jmx-to-java-flight-recorder/</link><pubDate>Thu, 03 Sep 2020 09:24:29 +0000</pubDate><guid>https://foojayio.github.io/website/today/introducing-jmfrx-a-bridge-from-jmx-to-java-flight-recorder/</guid><description>&lt;p&gt;I&amp;rsquo;m excited to share news about an open-source utility I&amp;rsquo;ve been working on lately: &lt;a href="https://github.com/gunnarmorling/jmfrx" target="_blank" rel="noopener noreferrer"&gt;JmFrX&lt;/a&gt;
, a tool for capturing JMX data with Java Flight Recorder.&lt;/p&gt;
&lt;p&gt;When using JMX (&lt;a href="https://en.wikipedia.org/wiki/Java_Management_Extensions" target="_blank" rel="noopener noreferrer"&gt;Java Management Extensions&lt;/a&gt;
), the Java platform&amp;rsquo;s standard for monitoring and managing applications, JmFrX allows you to periodically record the attributes from any JMX MBean into &lt;a href="https://openjdk.java.net/jeps/328" target="_blank" rel="noopener noreferrer"&gt;Java Flight Recorder&lt;/a&gt;
 (JFR) files, which you then can analyse using &lt;a href="https://openjdk.java.net/projects/jmc/" target="_blank" rel="noopener noreferrer"&gt;JDK Mission Control&lt;/a&gt;
 (JMC).&lt;/p&gt;</description></item><item><title>Monitoring REST APIs with Custom Java Flight Recorder Events</title><link>https://foojayio.github.io/website/today/monitoring-rest-apis-with-custom-flight-recorder-events/</link><pubDate>Wed, 26 Aug 2020 08:36:57 +0000</pubDate><guid>https://foojayio.github.io/website/today/monitoring-rest-apis-with-custom-flight-recorder-events/</guid><description>&lt;p&gt;The &lt;a href="https://openjdk.java.net/jeps/328" target="_blank" rel="noopener noreferrer"&gt;Java Flight Recorder&lt;/a&gt;
 (JFR) is an invaluable tool for gaining deep insights into the performance characteristics of Java applications. Open-sourced in JDK 11, JFR provides a low-overhead framework for collecting events from Java applications, the JVM and the operating system.&lt;/p&gt;
&lt;p&gt;In this blog post, we&amp;rsquo;re going to explore how custom, application-specific JFR events can be used to monitor a REST API, allowing to track request counts, identify long-running requests and more. We&amp;rsquo;ll also discuss how the JFR &lt;a href="https://openjdk.java.net/jeps/349" target="_blank" rel="noopener noreferrer"&gt;Event Streaming API&lt;/a&gt;
, new in Java 14, can be used to export live events, making them available for monitoring and alerting via tools such as Prometheus and Grafana.&lt;/p&gt;</description></item><item><title>A Closer Look at Java Flight Recorder Streaming</title><link>https://foojayio.github.io/website/today/a-closer-look-at-jfr-streaming/</link><pubDate>Mon, 17 Aug 2020 11:04:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/a-closer-look-at-jfr-streaming/</guid><description>&lt;p&gt;&lt;em&gt;By&lt;/em&gt; &lt;a href="https://twitter.com/hirt" target="_blank" rel="noopener noreferrer"&gt;&lt;em&gt;Marcus Hirt&lt;/em&gt;&lt;/a&gt;
&lt;em&gt;and&lt;/em&gt; &lt;a href="https://twitter.com/jpbempel" target="_blank" rel="noopener noreferrer"&gt;&lt;em&gt;JP Bempel&lt;/em&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Since JDK 14, there is a new Java Flight Recorder (JFR) kid on the block &amp;ndash; JFR streaming. 🙂 This blog post, written together with JP Bempel, will discuss some of the things that you can do with JFR streaming, as well as some of the things you may want to avoid.&lt;/p&gt;
&lt;h2 id="h2-0-an-introduction-to-jfr-streaming"&gt;An Introduction to JFR Streaming&lt;/h2&gt;
&lt;p&gt;In the most recent version of the JDK, a new JFR-related feature was introduced &amp;ndash; JFR streaming. It is a feature allowing a developer to subscribe to select JFR data and to decide what to do with that data in the host process. JFR events can also be consumed from a separate process by pointing to the file repo of a separate JVM process &amp;ndash; the mechanism is the same.&lt;/p&gt;</description></item></channel></rss>