JDK Flight Recorder (JFR) silently ignores array fields and most complex types in custom JFR events without emitting any warnings. Only a limited set of types are supported as event fields: Java primitives (boolean, char, byte, short, int, long, float, double) and a few reference types (String, Thread, Class, StackTrace). Arrays, enums, and other reference types are silently dropped. The post digs into the JVM source code (ClassInspector.java and Type.java) to explain why, and notes that transient and static fields are also excluded. Developers using custom JFR events should be aware of these constraints to avoid silently missing data.

4m read timeFrom mostlynerdless.de
Post cover image
Table of contents
Which Types are Supported?ConclusionAuthorRelated Posts:

Sort: