micronaut-micrometer icon indicating copy to clipboard operation
micronaut-micrometer copied to clipboard

Activating any kind of metrics with Java 21 seems not to work

Open JohannesRabauer opened this issue 10 months ago • 0 comments

Expected Behavior

The application should have started without logging a warning

Actual Behaviour

After application was configured to use java 21 - at startup, the application logs this warning:

[main] io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics.bindTo() Failed to bind as java.util.concurrent.ThreadPerTaskExecutor is unsupported.

I saw this Issue and thought this should be fixed: https://github.com/micronaut-projects/micronaut-micrometer/issues/679

Steps To Reproduce

Added these dependencies in the pom.xml:

        <dependency>
            <groupId>io.micronaut.micrometer</groupId>
            <artifactId>micronaut-micrometer-registry-prometheus</artifactId>
        </dependency>
        <dependency>
            <groupId>io.micronaut</groupId>
            <artifactId>micronaut-management</artifactId>
        </dependency>

As long as metrics.enabled in the application.yml is set to true, a warning appears:

  metrics:
    enabled: true
    export:
      prometheus:
        enabled: true
        step: PT1M
        descriptions: true

Environment Information

Operating system: Windows 11 JDK: 21 (oracle OpenJDK 21.0.1); Also Eclipse Temurine 21.0.2

Example Application

No response

Version

4.3.7

JohannesRabauer avatar Mar 28 '24 07:03 JohannesRabauer