Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,17 @@ public JobExecution start(Job job, JobParameters jobParameters) throws JobInstan
JobExecutionAlreadyRunningException, JobRestartException, InvalidJobParametersException {
Assert.notNull(job, "Job must not be null");
Assert.notNull(jobParameters, "JobParameters must not be null");
new JobLaunchEvent(job.getName(), jobParameters.toString()).commit();
try {
new JobLaunchEvent(job.getName(), jobParameters.toString()).commit();
}
catch (NoClassDefFoundError e) {
// JFR is not available on this runtime (e.g., minimized JRE without jdk.jfr
// module)
// Silently ignore and continue without JFR events
if (logger.isDebugEnabled()) {
logger.debug("JFR is not available, skipping JFR event creation");
}
}
Observation observation = MicrometerMetrics
.createObservation(METRICS_PREFIX + "job.launch.count", this.observationRegistry)
.start();
Expand Down