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

ServiceLevelObjectiveBoundary properties cannot be bound in a native image application #40480

Closed
gbaso opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: bug A general bug
Milestone

Comments

@gbaso
Copy link

gbaso commented Apr 22, 2024

When configuring management.metrics.distribution.slo in a native application, the ServiceLevelObjectiveBoundary#valueOf(String) factory method is not registered for reflection, resulting in a runtime error:

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'management.metrics.distribution.slo[http.server.requests]' to org.springframework.boot.actuate.autoconfigure.metrics.ServiceLevelObjectiveBoundary[]:

    Property: management.metrics.distribution.slo[http.server.requests]
    Value: "100ms, 200ms, 500ms, 1000ms"
    Origin: class path resource [application.yml] - 15:35
    Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [org.springframework.boot.actuate.autoconfigure.metrics.ServiceLevelObjectiveBoundary[]]

Action:

Update your application's configuration

To reproduce, create a sample application with web, actuator and graalvm support and application.yml:

management:
  endpoints:
    web:
      exposure:
        include: health,metrics
  metrics:
    distribution:
      slo:
        '[http.server.requests]': 100ms, 200ms, 500ms, 1000ms
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 22, 2024
@philwebb philwebb added type: bug A general bug theme: aot An issue related to Ahead-of-time processing and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 22, 2024
@philwebb philwebb added this to the 3.1.x milestone Apr 22, 2024
@philwebb philwebb self-assigned this Apr 23, 2024
@philwebb philwebb changed the title Missing graalvm native hints for ServiceLevelObjectiveBoundary ServiceLevelObjectiveBoundary properties cannot be bound in a native image application Apr 23, 2024
@philwebb philwebb modified the milestones: 3.1.x, 3.1.12 Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants