-
Sub-task
-
Resolution: Delivered
-
P4
-
25
A new annotation, `jdk.jfr.Contextual`, has been introduced to mark fields in custom JFR events that contain contextual information relevant to other events occurring in the same thread. For example, fields in a user-defined HTTP request event can be annotated with `@Contextual` to associate its URL and trace ID with events that occur during its execution, such as a `jdk.JavaMonitorEnter` event due to a contended logger.
Tools can now pair higher-level information, such as span and trace IDs, with lower-level events. The `print` command of the `jfr` tool, included in the JDK, displays this contextual information alongside JVM and JDK events, for example, in events for lock contention, I/O, or exceptions that occur during a trace span or an HTTP request event.
Tools can now pair higher-level information, such as span and trace IDs, with lower-level events. The `print` command of the `jfr` tool, included in the JDK, displays this contextual information alongside JVM and JDK events, for example, in events for lock contention, I/O, or exceptions that occur during a trace span or an HTTP request event.