[JBoss] Integration of Wildly 33 with micrometer subsystem

Discussão em 'StackOverflow' iniciado por Stack, Outubro 11, 2024.

  1. Stack

    Stack Membro Participativo

    Currently, I working on migrating Spring application to Wildly 33 from Wildfly 26.

    As per Wildfly 33 documentation, it's mentioned that microprofile is no longer supported and it's suggested to move to micrometer. Refer.

    I am not able to find sufficient documentation on such implementation.

    I tried below mentioned implementation,

    1. Changes in standalone.xml

    <extension module="org.wildfly.extension.micrometer"/>
    ...
    ...
    <subsystem xmlns="urn:wildfly:micrometer:1.0" exposed-subsystems="*"/>


    As per documentation endpoint, step attributes can be used above whereas using them gives error,

    Message: WFLYCTL0376: Unexpected attribute 'endpoint' encountered. Valid attributes are: 'exposed-subsystems, name'

    1. Micrometer Dependency

    <dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-core</artifactId>
    <version>1.13.4</version>
    </dependency>

    1. Code changes

    @Inject
    protected MeterRegistry meterRegistry;


    // incrementing the counter
    Counter.builder("my_counter").register(meterRegistry).increment();


    Above, injection returns NoOpRegistry (not SimpleMeterRegistry or any other implementation of MeterRegistry) and also from the WFY documentation, it's not clear that which port and endpoint these metrics are exposed. Am I doing anything wrong in this implementation?

    Continue reading...

Compartilhe esta Página