Class MetricsConfig
java.lang.Object
ubic.gemma.core.config.MetricsConfig
Phase 3 XML->Java migration: replaces the
<beans profile="metrics"> block from
applicationContext-serviceBeans.xml. Activated only when the metrics Spring
profile is set; otherwise none of these beans are instantiated.
The legacy MeterRegistryEhcacheConfigurer (Ehcache 2.x API) was deleted in Phase 2
along with the rest of the Ehcache 2 stack, which left the metrics profile broken
until Phase 3. It is replaced here by meterRegistryJCacheConfigurer(MeterRegistry, CacheManager) which binds
per-cache JSR-107 metrics from the new Ehcache 3 / JCache backend.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenericMeterRegistryConfigurer(io.micrometer.core.instrument.MeterRegistry meterRegistry, SessionFactory sessionFactory, DataSource dataSource, org.springframework.core.task.TaskExecutor taskExecutor, TaskRunningService taskRunningService, List<VirtualThreadExecutorMetrics> vtExecutorMetrics) Aggregate all theMeterBinders the legacy XML registered (basic JVM metrics, logging metrics, two Hibernate session-factory binders, one Hikari pool binder, one task-executor binder) plus theTaskRunningServicebean (which itself implementsMeterBinder).io.micrometer.core.instrument.MeterRegistrymeterRegistryJCacheConfigurer(io.micrometer.core.instrument.MeterRegistry meterRegistry, javax.cache.CacheManager jCacheCacheManager) Per-cache JSR-107 metrics (Ehcache 3 / JCache backend, seeEhcacheConfig).io.micrometer.core.aop.TimedAspecttimedAspect(io.micrometer.core.instrument.MeterRegistry meterRegistry) Enables@Timed-annotated method timing.
-
Constructor Details
-
MetricsConfig
public MetricsConfig()
-
-
Method Details
-
meterRegistry
@Bean public io.micrometer.core.instrument.MeterRegistry meterRegistry() -
genericMeterRegistryConfigurer
@Bean public GenericMeterRegistryConfigurer genericMeterRegistryConfigurer(io.micrometer.core.instrument.MeterRegistry meterRegistry, SessionFactory sessionFactory, DataSource dataSource, org.springframework.core.task.TaskExecutor taskExecutor, TaskRunningService taskRunningService, List<VirtualThreadExecutorMetrics> vtExecutorMetrics) Aggregate all theMeterBinders the legacy XML registered (basic JVM metrics, logging metrics, two Hibernate session-factory binders, one Hikari pool binder, one task-executor binder) plus theTaskRunningServicebean (which itself implementsMeterBinder). Order preserved from the XML. -
timedAspect
@Bean public io.micrometer.core.aop.TimedAspect timedAspect(io.micrometer.core.instrument.MeterRegistry meterRegistry) Enables@Timed-annotated method timing. The XML had a sibling<aop:aspectj-autoproxy/>; the consolidated@EnableAspectJAutoProxyonComponentScanConfignow covers it. -
meterRegistryJCacheConfigurer
@Bean public MeterRegistryJCacheConfigurer meterRegistryJCacheConfigurer(io.micrometer.core.instrument.MeterRegistry meterRegistry, javax.cache.CacheManager jCacheCacheManager) Per-cache JSR-107 metrics (Ehcache 3 / JCache backend, seeEhcacheConfig). Replaces theMeterRegistryJCacheConfigurerXML bean previously declared in applicationContext-serviceBeans.xml.
-