Replies: 2 comments
-
|
I see your point, and I think there is a room for improvement in Spring Batch here. However, I would like to know more about your expectations in terms of error reporting. For example, in the reference to |
Beta Was this translation helpful? Give feedback.
-
|
Dear @fmbenhassine I really appreciate you taking the time to discuss this. The first thing I would consider is when only one exception is inside the How the end user would like to handle the above cases (1 or more errors occur), it may vary on the business needs of that particular job/step. If it is mission critical to know and monitor all errors, then it should be somehow possible to report all occurred exceptions. So the framework should be configurable to see:
By default, I would consider the last error of an aggregated error for the metrics. Getting to my specific scenario, in my case (even if retry happens) the last error (or the single error which occurred) would be sufficient. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Spring Batch developers,
We are exposing our metrics via the production ready feature of Spring Boot, described here.
We would like to create a monitoring dashboard based on the provided metrics by Spring Batch framework.
Some of our envisioned dashboard tiles would provide an overview of what errors occurring in our batch steps/jobs.
e.g. number of jobs grouped by error causes, or something like what kind of error (and how many) arise in our steps.
However as I have seen so far, all exceptions are wrapped around a single type of exception and the only error type which appears in the metrics is
IllegalStateExceptionindependetly of the real nature/type of the problem/exception.References:
spring-batch/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java
Lines 373 to 376 in fe421d0
example prometheus data for a job:
spring_batch_job_seconds_count{error="IllegalStateException",instance_id="c69a861e-3e74-4bcb-8069-abead0aa5836",spring_batch_job_name="customjob",spring_batch_job_status="FAILED"} 1spring-batch/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java
Lines 367 to 370 in fe421d0
example prometheus data for a step:
spring_batch_step_seconds_count{error="IllegalStateException",instance_id="c69a861e-3e74-4bcb-8069-abead0aa5836",spring_batch_step_job_name="store-job",spring_batch_step_name="job-starter-step",spring_batch_step_status="FAILED"} 1Could you please point me to a direction how to overcome about the above problem or how to get default metrics around errors?
Or can you confirm is this a defect in the implementation?
🙏
Beta Was this translation helpful? Give feedback.
All reactions