Skip to content

Improve Micrometer's observation registry customization #4222

Closed
@fmbenhassine

Description

@fmbenhassine

As of 5.0.0-RC1, the ObservationRegistry used by Micrometer is statically defined and configured: https://github.com/spring-projects/spring-batch/blob/5.0.0-RC1/spring-batch-core/src/main/java/org/springframework/batch/core/observability/BatchMetrics.java#L61-L67.

This prevents users from adding custom handlers like a tracing one for example: https://github.com/micrometer-metrics/micrometer-samples/blob/main/batch/src/main/java/com/example/micrometer/ManualConfiguration.java

The goal of this issue is to remove the static configuration and implement a bean post processor that automatically sets the user's observation registry on observable batch artifacts (jobs, steps, etc).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions