-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as duplicate
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
As far as i can see here from MetricsAspectsAutoConfiguration ,
whenever we define a MeterTagAnnotationHandler
it will be set on the TimedAspect
.
However, this is not the case for CountedMeterTagAnnotationHandler
and CountedAspect
respectively:
public class MetricsAspectsAutoConfiguration {
@Bean
@ConditionalOnMissingBean
CountedAspect countedAspect(MeterRegistry registry) {
return new CountedAspect(registry); // <--- can we have the same here?
}
@Bean
@ConditionalOnMissingBean
TimedAspect timedAspect(MeterRegistry registry,
ObjectProvider<MeterTagAnnotationHandler> meterTagAnnotationHandler) {
TimedAspect timedAspect = new TimedAspect(registry);
meterTagAnnotationHandler.ifAvailable(timedAspect::setMeterTagAnnotationHandler);
return timedAspect;
}
}
Consequently, I need to configure the 2 aspects differently to achieve the same result.
Should we add an equivalent version for CountedAspect/ CountedMeterTagAnnotationHandler?
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue