You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/07/14 03:13:35 UTC

[GitHub] [shardingsphere] dachuan9e opened a new pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

dachuan9e opened a new pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327


   #11304 
   
   Integrate the Hikari metrics to Prometheus by java agent


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#discussion_r669376446



##########
File path: shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/test/java/org/apache/shardingsphere/agent/metrics/api/advice/DataSourceAdviceTest.java
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.agent.metrics.api.advice;
+
+import com.zaxxer.hikari.HikariDataSource;
+import org.apache.shardingsphere.agent.api.result.MethodInvocationResult;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import java.lang.reflect.Method;
+
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.class)
+public class DataSourceAdviceTest {

Review comment:
       BTW, ci failed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#discussion_r669375923



##########
File path: shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-metrics/shardingsphere-agent-metrics-api/src/test/java/org/apache/shardingsphere/agent/metrics/api/advice/DataSourceAdviceTest.java
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.agent.metrics.api.advice;
+
+import com.zaxxer.hikari.HikariDataSource;
+import org.apache.shardingsphere.agent.api.result.MethodInvocationResult;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import java.lang.reflect.Method;
+
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.class)
+public class DataSourceAdviceTest {

Review comment:
       It is suggested to be a final one.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] dachuan9e commented on pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
dachuan9e commented on pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#issuecomment-888148696


   Releated to https://github.com/apache/shardingsphere/issues/11451


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] dachuan9e commented on a change in pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
dachuan9e commented on a change in pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#discussion_r669335804



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/JDBCParameterDecoratorHelper.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.infra.config.datasource;
+
+import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
+
+import javax.sql.DataSource;
+import java.util.Optional;
+
+public class JDBCParameterDecoratorHelper {

Review comment:
       changed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#issuecomment-879582573


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#11327](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d9e4f0d) into [master](https://codecov.io/gh/apache/shardingsphere/commit/766c675229ef0910100893554bc3f34ae8d18532?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (766c675) will **increase** coverage by `0.03%`.
   > The diff coverage is `75.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/11327/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #11327      +/-   ##
   ============================================
   + Coverage     63.48%   63.51%   +0.03%     
   - Complexity     1027     1029       +2     
   ============================================
     Files          2207     2216       +9     
     Lines         33675    33735      +60     
     Branches       5893     5899       +6     
   ============================================
   + Hits          21379    21428      +49     
   - Misses        10590    10596       +6     
   - Partials       1706     1711       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ource/factory/JDBCRawBackendDataSourceFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb21tdW5pY2F0aW9uL2pkYmMvZGF0YXNvdXJjZS9mYWN0b3J5L0pEQkNSYXdCYWNrZW5kRGF0YVNvdXJjZUZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...onfig/datasource/JDBCParameterDecoratorHelper.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9jb25maWcvZGF0YXNvdXJjZS9KREJDUGFyYW1ldGVyRGVjb3JhdG9ySGVscGVyLmphdmE=) | `60.00% <60.00%> (ø)` | |
   | [...initializer/impl/AbstractBootstrapInitializer.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9pbml0aWFsaXplci9pbXBsL0Fic3RyYWN0Qm9vdHN0cmFwSW5pdGlhbGl6ZXIuamF2YQ==) | `47.27% <80.00%> (+3.04%)` | :arrow_up: |
   | [...ere/agent/metrics/api/advice/DataSourceAdvice.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tbWV0cmljcy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvbWV0cmljcy9hcGkvYWR2aWNlL0RhdGFTb3VyY2VBZHZpY2UuamF2YQ==) | `85.71% <85.71%> (ø)` | |
   | [...api/definition/MetricsPluginDefinitionService.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tbWV0cmljcy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvbWV0cmljcy9hcGkvZGVmaW5pdGlvbi9NZXRyaWNzUGx1Z2luRGVmaW5pdGlvblNlcnZpY2UuamF2YQ==) | `100.00% <100.00%> (ø)` | |
   | [...fra/config/datasource/DataSourceConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9jb25maWcvZGF0YXNvdXJjZS9EYXRhU291cmNlQ29uZmlndXJhdGlvbi5qYXZh) | `74.64% <100.00%> (+2.04%)` | :arrow_up: |
   | [...esher/type/CreateViewStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9zY2hlbWEvcmVmcmVzaGVyL3R5cGUvQ3JlYXRlVmlld1N0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | [...ddl/impl/ShardingAlterTableStatementValidator.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcm91dGUvZW5naW5lL3ZhbGlkYXRvci9kZGwvaW1wbC9TaGFyZGluZ0FsdGVyVGFibGVTdGF0ZW1lbnRWYWxpZGF0b3IuamF2YQ==) | `69.23% <0.00%> (-17.44%)` | :arrow_down: |
   | [...sher/type/CreateTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9zY2hlbWEvcmVmcmVzaGVyL3R5cGUvQ3JlYXRlVGFibGVTdGF0ZW1lbnRTY2hlbWFSZWZyZXNoZXIuamF2YQ==) | `66.66% <0.00%> (-9.53%)` | :arrow_down: |
   | [...esher/type/AlterTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9zY2hlbWEvcmVmcmVzaGVyL3R5cGUvQWx0ZXJUYWJsZVN0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `75.00% <0.00%> (-7.76%)` | :arrow_down: |
   | ... and [29 more](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [766c675...d9e4f0d](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] dachuan9e commented on a change in pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
dachuan9e commented on a change in pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#discussion_r669335718



##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/factory/JDBCRawBackendDataSourceFactory.java
##########
@@ -22,28 +22,28 @@
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
 import org.apache.shardingsphere.infra.config.datasource.DataSourceParameter;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecoratorHelper;
 import org.apache.shardingsphere.infra.exception.ShardingSphereException;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.proxy.backend.communication.jdbc.recognizer.JDBCDriverURLRecognizerEngine;
 
 import javax.sql.DataSource;
-import java.util.Optional;
 
 /**
  * Backend data source factory using {@code HikariDataSource} for JDBC raw.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 @Slf4j
 public final class JDBCRawBackendDataSourceFactory implements JDBCBackendDataSourceFactory {
-    
+
     private static final JDBCRawBackendDataSourceFactory INSTANCE = new JDBCRawBackendDataSourceFactory();
-    
+

Review comment:
       ok




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#discussion_r669296487



##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/factory/JDBCRawBackendDataSourceFactory.java
##########
@@ -22,28 +22,28 @@
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
 import org.apache.shardingsphere.infra.config.datasource.DataSourceParameter;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecoratorHelper;
 import org.apache.shardingsphere.infra.exception.ShardingSphereException;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.proxy.backend.communication.jdbc.recognizer.JDBCDriverURLRecognizerEngine;
 
 import javax.sql.DataSource;
-import java.util.Optional;
 
 /**
  * Backend data source factory using {@code HikariDataSource} for JDBC raw.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 @Slf4j
 public final class JDBCRawBackendDataSourceFactory implements JDBCBackendDataSourceFactory {
-    
+
     private static final JDBCRawBackendDataSourceFactory INSTANCE = new JDBCRawBackendDataSourceFactory();
-    
+

Review comment:
       Please reverse these invalid changes. 

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/JDBCParameterDecoratorHelper.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.infra.config.datasource;
+
+import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
+
+import javax.sql.DataSource;
+import java.util.Optional;
+
+public class JDBCParameterDecoratorHelper {

Review comment:
       If it is just a util class, it is better to define it as a final class and add `@NoArgsConstructor(access = AccessLevel.PRIVATE)` for it.

##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/factory/JDBCRawBackendDataSourceFactory.java
##########
@@ -22,28 +22,28 @@
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
 import org.apache.shardingsphere.infra.config.datasource.DataSourceParameter;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecorator;
+import org.apache.shardingsphere.infra.config.datasource.JDBCParameterDecoratorHelper;
 import org.apache.shardingsphere.infra.exception.ShardingSphereException;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.proxy.backend.communication.jdbc.recognizer.JDBCDriverURLRecognizerEngine;
 
 import javax.sql.DataSource;
-import java.util.Optional;
 
 /**
  * Backend data source factory using {@code HikariDataSource} for JDBC raw.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 @Slf4j
 public final class JDBCRawBackendDataSourceFactory implements JDBCBackendDataSourceFactory {
-    
+
     private static final JDBCRawBackendDataSourceFactory INSTANCE = new JDBCRawBackendDataSourceFactory();
-    
+

Review comment:
       [Settings for IDEA](https://shardingsphere.apache.org/community/data/shardingsphere-settings.jar) FYI.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] dachuan9e commented on pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
dachuan9e commented on pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#issuecomment-879556832


   Name the hikari pool as the following format for identify when exporting metrics data.
   
     <schema_name>/<datasource_name>
     
    example:  sharding_db/ds_0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter commented on pull request #11327: Integrate the Hikari metrics to Prometheus by java agent

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #11327:
URL: https://github.com/apache/shardingsphere/pull/11327#issuecomment-879582573


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#11327](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (23ec565) into [master](https://codecov.io/gh/apache/shardingsphere/commit/766c675229ef0910100893554bc3f34ae8d18532?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (766c675) will **increase** coverage by `0.01%`.
   > The diff coverage is `72.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/11327/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #11327      +/-   ##
   ============================================
   + Coverage     63.48%   63.49%   +0.01%     
   - Complexity     1027     1029       +2     
   ============================================
     Files          2207     2215       +8     
     Lines         33675    33734      +59     
     Branches       5893     5901       +8     
   ============================================
   + Hits          21379    21420      +41     
   - Misses        10590    10602      +12     
   - Partials       1706     1712       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ource/factory/JDBCRawBackendDataSourceFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb21tdW5pY2F0aW9uL2pkYmMvZGF0YXNvdXJjZS9mYWN0b3J5L0pEQkNSYXdCYWNrZW5kRGF0YVNvdXJjZUZhY3RvcnkuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...onfig/datasource/JDBCParameterDecoratorHelper.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9jb25maWcvZGF0YXNvdXJjZS9KREJDUGFyYW1ldGVyRGVjb3JhdG9ySGVscGVyLmphdmE=) | `50.00% <50.00%> (ø)` | |
   | [...initializer/impl/AbstractBootstrapInitializer.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9pbml0aWFsaXplci9pbXBsL0Fic3RyYWN0Qm9vdHN0cmFwSW5pdGlhbGl6ZXIuamF2YQ==) | `47.27% <80.00%> (+3.04%)` | :arrow_up: |
   | [...ere/agent/metrics/api/advice/DataSourceAdvice.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tbWV0cmljcy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvbWV0cmljcy9hcGkvYWR2aWNlL0RhdGFTb3VyY2VBZHZpY2UuamF2YQ==) | `85.71% <85.71%> (ø)` | |
   | [...api/definition/MetricsPluginDefinitionService.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tbWV0cmljcy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvbWV0cmljcy9hcGkvZGVmaW5pdGlvbi9NZXRyaWNzUGx1Z2luRGVmaW5pdGlvblNlcnZpY2UuamF2YQ==) | `100.00% <100.00%> (ø)` | |
   | [...fra/config/datasource/DataSourceConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9jb25maWcvZGF0YXNvdXJjZS9EYXRhU291cmNlQ29uZmlndXJhdGlvbi5qYXZh) | `74.64% <100.00%> (+2.04%)` | :arrow_up: |
   | [...esher/type/CreateViewStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9zY2hlbWEvcmVmcmVzaGVyL3R5cGUvQ3JlYXRlVmlld1N0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | [...ddl/impl/ShardingAlterTableStatementValidator.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcm91dGUvZW5naW5lL3ZhbGlkYXRvci9kZGwvaW1wbC9TaGFyZGluZ0FsdGVyVGFibGVTdGF0ZW1lbnRWYWxpZGF0b3IuamF2YQ==) | `69.23% <0.00%> (-17.44%)` | :arrow_down: |
   | [...sher/type/CreateTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9zY2hlbWEvcmVmcmVzaGVyL3R5cGUvQ3JlYXRlVGFibGVTdGF0ZW1lbnRTY2hlbWFSZWZyZXNoZXIuamF2YQ==) | `66.66% <0.00%> (-9.53%)` | :arrow_down: |
   | [...esher/type/AlterTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9zY2hlbWEvcmVmcmVzaGVyL3R5cGUvQWx0ZXJUYWJsZVN0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `75.00% <0.00%> (-7.76%)` | :arrow_down: |
   | ... and [24 more](https://codecov.io/gh/apache/shardingsphere/pull/11327/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [766c675...23ec565](https://codecov.io/gh/apache/shardingsphere/pull/11327?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org