Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Micrometer's observation registry customization #4222

Closed
fmbenhassine opened this issue Nov 7, 2022 · 0 comments
Closed

Improve Micrometer's observation registry customization #4222

fmbenhassine opened this issue Nov 7, 2022 · 0 comments

Comments

@fmbenhassine
Copy link
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant