Sub-issue of quarkus-for-spring-developers/project-management#33
I'm not sure the purpose of the RegisterMeterRegistry class. GreetingResource already injects the MeterRegistry. Why does it need to be passed into a subclass with public attributes?
GreetingResource could simply be
@Path("/hello")
public class GreetingResource {
private final MeterRegistry registry;
public GreetingResource(MeterRegistry registry) {
this.registry = registry;
}
@GET
@Path("/{name}")
public String sayHello(@PathParam(value = "name") String name) {
registry.counter("greeting_counter", Tags.of("name", name)).increment();
return "Hello!";
}
}
and then MonitoringResource could have private final attributes for the MeterRegistry and the list.
Sub-issue of quarkus-for-spring-developers/project-management#33
I'm not sure the purpose of the
RegisterMeterRegistry
class.GreetingResource
already injects theMeterRegistry
. Why does it need to be passed into a subclass withpublic
attributes?GreetingResource
could simply beand then
MonitoringResource
could haveprivate final
attributes for theMeterRegistry
and thelist
.