From 37b40433b692d479425089cf6ee29e9b80ae725c Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Wed, 7 Aug 2024 21:50:20 +0800 Subject: [PATCH 1/8] apply meter filters earlier Signed-off-by: Jordan Hasgul --- gradle.properties | 2 +- .../entrypoints/EntryPointsAutoConfiguration.java | 10 ++++++++-- .../TableAccessStatisticsSpyqlListener.java | 1 - .../TransactionsStatisticsSpyqlListener.java | 1 - 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2cc408f..0e1ffcd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=2.16.2 +version=2.16.3 diff --git a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java index 0bdac0e..351c83b 100644 --- a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java +++ b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java @@ -14,10 +14,12 @@ import com.transferwise.common.entrypoints.tableaccessstatistics.DefaultTasQueryParsingListener; import com.transferwise.common.entrypoints.tableaccessstatistics.TableAccessStatisticsBeanPostProcessor; import com.transferwise.common.entrypoints.tableaccessstatistics.TasFlywayConfigurationCustomizer; +import com.transferwise.common.entrypoints.tableaccessstatistics.TasMeterFilter; import com.transferwise.common.entrypoints.tableaccessstatistics.TasParsedQueryRegistry; import com.transferwise.common.entrypoints.tableaccessstatistics.TasQueryParsingInterceptor; import com.transferwise.common.entrypoints.tableaccessstatistics.TasQueryParsingListener; import com.transferwise.common.entrypoints.transactionstatistics.TransactionStatisticsBeanPostProcessor; +import com.transferwise.common.entrypoints.transactionstatistics.TsMeterFilter; import io.micrometer.core.instrument.MeterRegistry; import org.springframework.beans.factory.BeanFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -63,7 +65,9 @@ public static DatabaseAccessStatisticsBeanPostProcessor twEntryPointsDatabaseAcc @Bean @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public static TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory) { + public static TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory, + MeterRegistry meterRegistry) { + meterRegistry.config().meterFilter(new TasMeterFilter()); return new TableAccessStatisticsBeanPostProcessor(beanFactory); } @@ -105,7 +109,9 @@ public TasFlywayConfigurationCustomizer tasFlywayConfigurationCustomizer() { @Bean @ConditionalOnProperty(name = "tw-entrypoints.ts.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public static TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory) { + public static TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory, + MeterRegistry meterRegistry) { + meterRegistry.config().meterFilter(new TsMeterFilter()); return new TransactionStatisticsBeanPostProcessor(beanFactory); } diff --git a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/tableaccessstatistics/TableAccessStatisticsSpyqlListener.java b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/tableaccessstatistics/TableAccessStatisticsSpyqlListener.java index 42379d8..7df1e60 100644 --- a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/tableaccessstatistics/TableAccessStatisticsSpyqlListener.java +++ b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/tableaccessstatistics/TableAccessStatisticsSpyqlListener.java @@ -95,7 +95,6 @@ public TableAccessStatisticsSpyqlListener(IMeterCache meterCache, ExecutorServic this.tasQueryParsingListener = tasQueryParsingListener; final MeterRegistry meterRegistry = meterCache.getMeterRegistry(); - meterRegistry.config().meterFilter(new TasMeterFilter()); sqlParseResultsCache = Caffeine.newBuilder().maximumWeight(entryPointsProperties.getTas().getSqlParser().getCacheSizeMib() * MIB).recordStats() .executor(executorService) diff --git a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionsStatisticsSpyqlListener.java b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionsStatisticsSpyqlListener.java index 895e951..c963827 100644 --- a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionsStatisticsSpyqlListener.java +++ b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionsStatisticsSpyqlListener.java @@ -67,7 +67,6 @@ public class TransactionsStatisticsSpyqlListener implements SpyqlDataSourceListe public TransactionsStatisticsSpyqlListener(IMeterCache meterCache, String databaseName) { this.dbTag = Tag.of(EntryPointsMetrics.TAG_DATABASE, databaseName); this.meterCache = meterCache; - meterCache.getMeterRegistry().config().meterFilter(new TsMeterFilter()); } @Override From a4aec2df15766ae2e3d5630e48161ccb7ae69f4b Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Wed, 7 Aug 2024 22:03:54 +0800 Subject: [PATCH 2/8] just supply beans of meterfilter Signed-off-by: Jordan Hasgul --- .../EntryPointsAutoConfiguration.java | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java index 351c83b..b7c983b 100644 --- a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java +++ b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java @@ -19,8 +19,8 @@ import com.transferwise.common.entrypoints.tableaccessstatistics.TasQueryParsingInterceptor; import com.transferwise.common.entrypoints.tableaccessstatistics.TasQueryParsingListener; import com.transferwise.common.entrypoints.transactionstatistics.TransactionStatisticsBeanPostProcessor; -import com.transferwise.common.entrypoints.transactionstatistics.TsMeterFilter; import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.core.instrument.config.MeterFilter; import org.springframework.beans.factory.BeanFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; @@ -65,12 +65,16 @@ public static DatabaseAccessStatisticsBeanPostProcessor twEntryPointsDatabaseAcc @Bean @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public static TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory, - MeterRegistry meterRegistry) { - meterRegistry.config().meterFilter(new TasMeterFilter()); + public static TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory) { return new TableAccessStatisticsBeanPostProcessor(beanFactory); } + @Bean + @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) + public static MeterFilter twEntryPointsTableAccessStatisticsMeterFilter() { + return new TasMeterFilter(); + } + @Bean @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean(TasParsedQueryRegistry.class) @@ -78,6 +82,7 @@ public DefaultTasParsedQueryRegistry twEntryPointsTableAccessStatisticsParsedQue return new DefaultTasParsedQueryRegistry(); } + @Bean @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean(TasQueryParsingInterceptor.class) @@ -109,12 +114,16 @@ public TasFlywayConfigurationCustomizer tasFlywayConfigurationCustomizer() { @Bean @ConditionalOnProperty(name = "tw-entrypoints.ts.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public static TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory, - MeterRegistry meterRegistry) { - meterRegistry.config().meterFilter(new TsMeterFilter()); + public static TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory) { return new TransactionStatisticsBeanPostProcessor(beanFactory); } + @Bean + @ConditionalOnProperty(name = "tw-entrypoints.ts.enabled", havingValue = "true", matchIfMissing = true) + public static MeterFilter twEntryPointsTransactionStatisticsMetricsFilter() { + return new TasMeterFilter(); + } + @Bean @ConditionalOnProperty(name = "tw-entrypoints.es.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean From dc5225c6edad116c12417c7bd9e2e6fba5cf4b5d Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Wed, 7 Aug 2024 22:30:29 +0800 Subject: [PATCH 3/8] update changelog Signed-off-by: Jordan Hasgul --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2198190..7edb2a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.16.3] - 2024-08-7 + +### Changed + +* MeterFilter's applied by the library are no longer explicitly applied and are instead + ## [2.16.2] - 2024-07-16 ### Added From 37b95149cf834fbe1c03e723c901b8d77f838c1a Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Thu, 8 Aug 2024 16:20:14 +0800 Subject: [PATCH 4/8] fix mysql not starting Signed-off-by: Jordan Hasgul --- .../src/test/resources/application.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tw-entrypoints-starter/src/test/resources/application.yml b/tw-entrypoints-starter/src/test/resources/application.yml index 255723c..4fbc18c 100644 --- a/tw-entrypoints-starter/src/test/resources/application.yml +++ b/tw-entrypoints-starter/src/test/resources/application.yml @@ -13,9 +13,11 @@ tw-graceful-shutdown: --- spring: + datasource: + embedded: + mysql: + port: 3306 + enable: true config: activate: - on-profile: continuous-integration -embedded: - mysql: - port: 3306 + on-profile: continuous-integration \ No newline at end of file From e55ce625b838ca8bbbc4de5b60bc2c1006d8eebc Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Thu, 8 Aug 2024 16:51:55 +0800 Subject: [PATCH 5/8] fix test names Signed-off-by: Jordan Hasgul --- .../transactionstatistics/TransactionStatisticsIntTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tw-entrypoints-starter/src/test/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionStatisticsIntTest.java b/tw-entrypoints-starter/src/test/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionStatisticsIntTest.java index 49cbecf..f693b65 100644 --- a/tw-entrypoints-starter/src/test/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionStatisticsIntTest.java +++ b/tw-entrypoints-starter/src/test/java/com/transferwise/common/entrypoints/transactionstatistics/TransactionStatisticsIntTest.java @@ -32,7 +32,7 @@ public void setup() { } @Test - public void successfullTransactionGetsRegisterd() { + public void successfulTransactionGetsRegistered() { transactionsHelper.withTransaction().call(() -> { jdbcTemplate.update("update table_a set version=2"); return null; @@ -73,7 +73,7 @@ public void successfullTransactionGetsRegisterd() { } @Test - public void rollbackGetsRegisterd() { + public void rollbackGetsRegistered() { try { transactionsHelper.withTransaction().call(() -> { jdbcTemplate.update("update table_a set version=2"); From 47d0160e3e4870ea6279344f22b4ba46c53c96c7 Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Thu, 8 Aug 2024 16:52:16 +0800 Subject: [PATCH 6/8] Provide TsMetricFilter not Tas Signed-off-by: Jordan Hasgul --- .../common/entrypoints/EntryPointsAutoConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java index b7c983b..f808502 100644 --- a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java +++ b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java @@ -19,6 +19,7 @@ import com.transferwise.common.entrypoints.tableaccessstatistics.TasQueryParsingInterceptor; import com.transferwise.common.entrypoints.tableaccessstatistics.TasQueryParsingListener; import com.transferwise.common.entrypoints.transactionstatistics.TransactionStatisticsBeanPostProcessor; +import com.transferwise.common.entrypoints.transactionstatistics.TsMeterFilter; import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.config.MeterFilter; import org.springframework.beans.factory.BeanFactory; @@ -121,7 +122,7 @@ public static TransactionStatisticsBeanPostProcessor twEntryPointsTransactionSta @Bean @ConditionalOnProperty(name = "tw-entrypoints.ts.enabled", havingValue = "true", matchIfMissing = true) public static MeterFilter twEntryPointsTransactionStatisticsMetricsFilter() { - return new TasMeterFilter(); + return new TsMeterFilter(); } @Bean From a6467e2e6a3fe5ea8df9f382abf0b69a729bccc7 Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Thu, 8 Aug 2024 17:15:31 +0800 Subject: [PATCH 7/8] add remaining filters as beans Signed-off-by: Jordan Hasgul --- .../EntryPointsAutoConfiguration.java | 26 +++++++++++++++---- ...AccessStatisticsEntryPointInterceptor.java | 1 - ...cutionStatisticsEntryPointInterceptor.java | 1 - 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java index f808502..5df4695 100644 --- a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java +++ b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java @@ -5,9 +5,11 @@ import com.transferwise.common.baseutils.meters.cache.IMeterCache; import com.transferwise.common.baseutils.meters.cache.MeterCache; import com.transferwise.common.context.TwContext; +import com.transferwise.common.entrypoints.databaseaccessstatistics.DasMeterFilter; import com.transferwise.common.entrypoints.databaseaccessstatistics.DasUnknownCallsCollector; import com.transferwise.common.entrypoints.databaseaccessstatistics.DatabaseAccessStatisticsBeanPostProcessor; import com.transferwise.common.entrypoints.databaseaccessstatistics.DatabaseAccessStatisticsEntryPointInterceptor; +import com.transferwise.common.entrypoints.executionstatistics.EsMeterFilter; import com.transferwise.common.entrypoints.executionstatistics.ExecutionStatisticsEntryPointInterceptor; import com.transferwise.common.entrypoints.tableaccessstatistics.DefaultTasParsedQueryRegistry; import com.transferwise.common.entrypoints.tableaccessstatistics.DefaultTasQueryParsingInterceptor; @@ -59,20 +61,27 @@ public DatabaseAccessStatisticsEntryPointInterceptor twEntryPointsDatabaseAccess @Bean @ConditionalOnProperty(name = "tw-entrypoints.das.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public static DatabaseAccessStatisticsBeanPostProcessor twEntryPointsDatabaseAccessStatisticsBeanPostProcessor() { + public DatabaseAccessStatisticsBeanPostProcessor twEntryPointsDatabaseAccessStatisticsBeanPostProcessor() { return new DatabaseAccessStatisticsBeanPostProcessor(); } + + @Bean + @ConditionalOnProperty(name = "tw-entrypoints.das.enabled", havingValue = "true", matchIfMissing = true) + public MeterFilter twEntryPointsDatabaseAccessStatisticsMeterFilter() { + return new DasMeterFilter(); + } + @Bean @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public static TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory) { + public TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory) { return new TableAccessStatisticsBeanPostProcessor(beanFactory); } @Bean @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) - public static MeterFilter twEntryPointsTableAccessStatisticsMeterFilter() { + public MeterFilter twEntryPointsTableAccessStatisticsMeterFilter() { return new TasMeterFilter(); } @@ -115,13 +124,13 @@ public TasFlywayConfigurationCustomizer tasFlywayConfigurationCustomizer() { @Bean @ConditionalOnProperty(name = "tw-entrypoints.ts.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public static TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory) { + public TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory) { return new TransactionStatisticsBeanPostProcessor(beanFactory); } @Bean @ConditionalOnProperty(name = "tw-entrypoints.ts.enabled", havingValue = "true", matchIfMissing = true) - public static MeterFilter twEntryPointsTransactionStatisticsMetricsFilter() { + public MeterFilter twEntryPointsTransactionStatisticsMetricsFilter() { return new TsMeterFilter(); } @@ -134,6 +143,13 @@ public ExecutionStatisticsEntryPointInterceptor twEntryPointsExecutionStatistics return interceptor; } + @Bean + @ConditionalOnProperty(name = "tw-entrypoints.es.enabled", havingValue = "true", matchIfMissing = true) + public MeterFilter twEntryPointsExecutionStatisticsMetricsFilter() { + return new EsMeterFilter(); + } + + @Bean @ConditionalOnMissingBean(IExecutorServicesProvider.class) public DefaultExecutorServicesProvider twDefaultExecutorServicesProvider() { diff --git a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/databaseaccessstatistics/DatabaseAccessStatisticsEntryPointInterceptor.java b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/databaseaccessstatistics/DatabaseAccessStatisticsEntryPointInterceptor.java index 62d08a2..696dd60 100644 --- a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/databaseaccessstatistics/DatabaseAccessStatisticsEntryPointInterceptor.java +++ b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/databaseaccessstatistics/DatabaseAccessStatisticsEntryPointInterceptor.java @@ -35,7 +35,6 @@ public class DatabaseAccessStatisticsEntryPointInterceptor implements TwContextE public DatabaseAccessStatisticsEntryPointInterceptor(IMeterCache meterCache) { this.meterCache = meterCache; - meterCache.getMeterRegistry().config().meterFilter(new DasMeterFilter()); } @Override diff --git a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/executionstatistics/ExecutionStatisticsEntryPointInterceptor.java b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/executionstatistics/ExecutionStatisticsEntryPointInterceptor.java index d4c3341..30c1ce3 100644 --- a/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/executionstatistics/ExecutionStatisticsEntryPointInterceptor.java +++ b/tw-entrypoints/src/main/java/com/transferwise/common/entrypoints/executionstatistics/ExecutionStatisticsEntryPointInterceptor.java @@ -18,7 +18,6 @@ public class ExecutionStatisticsEntryPointInterceptor implements TwContextExecut public ExecutionStatisticsEntryPointInterceptor(IMeterCache meterCache) { this.meterCache = meterCache; - meterCache.getMeterRegistry().config().meterFilter(new EsMeterFilter()); } @Override From 602e45c7a55b8cb06739f75e41901faba4c2f29c Mon Sep 17 00:00:00 2001 From: Jordan Hasgul Date: Thu, 8 Aug 2024 17:18:54 +0800 Subject: [PATCH 8/8] static for post processors Signed-off-by: Jordan Hasgul --- .../common/entrypoints/EntryPointsAutoConfiguration.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java index 5df4695..184055a 100644 --- a/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java +++ b/tw-entrypoints-starter/src/main/java/com/transferwise/common/entrypoints/EntryPointsAutoConfiguration.java @@ -61,7 +61,7 @@ public DatabaseAccessStatisticsEntryPointInterceptor twEntryPointsDatabaseAccess @Bean @ConditionalOnProperty(name = "tw-entrypoints.das.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public DatabaseAccessStatisticsBeanPostProcessor twEntryPointsDatabaseAccessStatisticsBeanPostProcessor() { + public static DatabaseAccessStatisticsBeanPostProcessor twEntryPointsDatabaseAccessStatisticsBeanPostProcessor() { return new DatabaseAccessStatisticsBeanPostProcessor(); } @@ -75,7 +75,7 @@ public MeterFilter twEntryPointsDatabaseAccessStatisticsMeterFilter() { @Bean @ConditionalOnProperty(name = "tw-entrypoints.tas.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory) { + public static TableAccessStatisticsBeanPostProcessor twEntryPointsTableAccessStatisticsBeanPostProcessor(BeanFactory beanFactory) { return new TableAccessStatisticsBeanPostProcessor(beanFactory); } @@ -124,7 +124,7 @@ public TasFlywayConfigurationCustomizer tasFlywayConfigurationCustomizer() { @Bean @ConditionalOnProperty(name = "tw-entrypoints.ts.enabled", havingValue = "true", matchIfMissing = true) @ConditionalOnMissingBean - public TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory) { + public static TransactionStatisticsBeanPostProcessor twEntryPointsTransactionStatisticsBeanPostProcessor(BeanFactory beanFactory) { return new TransactionStatisticsBeanPostProcessor(beanFactory); }