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

Auto-configuration of ObservationRestTemplateCustomizer fails when micrometer-core is not on the classpath #32676

Closed
wilkinsona opened this issue Oct 11, 2022 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

Without micrometer-core, there's no MetricsProperties bean which causes an injection failure:

Error creating bean with name 'observationRestTemplateCustomizer' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/web/client/RestTemplateObservationConfiguration.class]: Unsatisfied dependency expressed through method 'observationRestTemplateCustomizer' parameter 2: No qualifying bean of type 'org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

Until we've dropped the usage of MetricsProperties and switched over entirely to ObservationProperties, we need to make sure MetricsProperties has been enabled.

@wilkinsona wilkinsona added the type: bug A general bug label Oct 11, 2022
@wilkinsona wilkinsona added this to the 3.0.x milestone Oct 11, 2022
@wilkinsona wilkinsona self-assigned this Oct 11, 2022
@wilkinsona wilkinsona modified the milestones: 3.0.x, 3.0.0-RC1 Oct 11, 2022
@wilkinsona
Copy link
Member Author

wilkinsona commented Oct 12, 2022

With thanks to @ryanjbaxter for pointing out the problem, we need to take a different approach here as MetricsProperties is tightly coupled to Micrometer Metrics. It references AutoTimeProperties which depends on io.micrometer.core.instrument.Timer.Builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant