Skip to content

@Gauge of SmallRye Metrics not working in API Rest Beans - not managed by CDI #47037

Open
@RayanArgolo03

Description

@RayanArgolo03

Describe the bug

Image

``

public final class AuthenticationResource {

public static final String RESOURCE_PATH = "/api/v1/auth";

@Inject
AuthenticationService authenticationService;

@Inject
KeycloakService keycloakService;

@Inject
MailerService mailerService;

@Inject
ClientService clientService;

@Inject
Logger log;

@Inject
UriInfo uriInfo;

//Receives exception
@GET
@PermitAll
@Gauge(name = "auth.testing", absolute = true, unit = MetricUnits.GIGABYTES)
@Path("/free-memory")
public Response getFreeMemory() {
    return Response.ok(clientService.getFreeMemory())
            .build();
}

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

19

Output of java -version

17

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions