Package org.springframework.core.metrics.jfr

# Class FlightRecorderApplicationStartup

java.lang.Object
org.springframework.core.metrics.jfr.FlightRecorderApplicationStartup

All Implemented Interfaces:
  `ApplicationStartup`

public class FlightRecorderApplicationStartup extends Object implements ApplicationStartup
`ApplicationStartup` implementation for the Java Flight Recorder.

This variant records `StartupStep` as Flight Recorder events. Because such events only support base types, the `StartupStep.Tags` are serialized as a single String attribute.

Once this is configured on the application context, you can record data by launching the application with recording enabled: `java -XX:StartFlightRecording:filename=recording.jfr,duration=10s -jar app.jar`.

Since:
  5.3
Author:
  Brian Clozel

## Field Summary

### Fields inherited from interface org.springframework.core.metrics.ApplicationStartup

`DEFAULT`

## Constructor Summary

Constructors
Constructor
Description
`FlightRecorderApplicationStartup()`

## Method Summary

Modifier and Type
Method
Description
`StartupStep`
`start(String name)`
Create a new step and marks its beginning.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FlightRecorderApplicationStartup

public FlightRecorderApplicationStartup()

## Method Details

### start

public StartupStep start(String name)
Description copied from interface: `ApplicationStartup`
Create a new step and marks its beginning.

A step name describes the current action or phase. This technical name should be "." namespaced and can be reused to describe other instances of the same step during application startup.

Specified by:
  `start` in interface `ApplicationStartup`
Parameters:
  `name` - the step name