luchunliang opened a new pull request #1797:
URL: https://github.com/apache/incubator-inlong/pull/1797


   ### Title Name: [INLONG-1796][component] DataProxy support monitor indicator 
with JMX. #1796
   
   [Feature]DataProxy support monitor indicator with JMX. #1796
   
   Fixes #<1796>
   
   ### Motivation
   
   [Feature]DataProxy provide monitor indicator based on JMX, user can 
implement the code that read the metrics and report to user-defined monitor 
system.
   
   DataProxy provide monitor indicator based on JMX, user can implement the 
code that read the metrics and report to user-defined monitor system.
   Source-module and Sink-module can add monitor metric class that is the 
subclass of org.apache.inlong.commons.config.metrics.MetricItemSet, and 
register it to MBeanServer.
   User-defined plugin can get module metric with JMX, and report metric data 
to different monitor system.
   
   User can describe the configuration in the file "common.properties ".
   For example:
   `
   metricDomains=DataProxy
   
metricDomains.DataProxy.domainListeners=com.tencent.pcg.atta.dataproxy.metrics.m007.M007MetricListener
 org.apache.inlong.dataproxy.metrics.prometheus.PrometheusMetricListener
   metricDomains.DataProxy.snapshotInterval=60000
   `
   
   The JMX domain name of DataProxy is "DataProxy". 
   It is defined by the parameter "metricDomains".
   The listeners of JMX domain is defined by the parameter 
"metricDomains.$domainName.domainListeners".
   The class names of the listeners is separated by the space char. 
   The listener class need to implement the interface 
"org.apache.inlong.dataproxy.metrics.MetricListener".
   The snapshot interval of the listeners is defined by the parameter 
"metricDomains.$domainName.snapshotInterval", the parameter unit is 
"millisecond".
   
   The method proto of org.apache.inlong.dataproxy.metrics.MetricListener is:
   public void snapshot(String domain, List<MetricItemValue> itemValues);
   
   The field of MetricItemValue.dimensions has these key(The fields of 
DataProxyMetricItem defined by the Annotation "@Dimension"):
   
   - public String clusterId;
   - public String sourceId;
   - public String sourceDataId;
   - public String inlongGroupId;
   - public String inlongStreamId;
   - public String sinkId;
   - public String sinkDataId;
   
   The field of MetricItemValue.metrics has these key(The fields of 
DataProxyMetricItem defined by the Annotation "@CountMetric"):
   
   - readSuccessCount
   - readSuccessSize
   - readSuccessCount
   - readSuccessSize
   - readFailCount
   - readFailSize
   - sendCount
   - sendSize
   - sendSuccessCount
   - sendSuccessSize
   - sendFailCount
   - sendFailSize
   - sinkDuration, the unit is millisecond, the duration is between current 
timepoint and the timepoint in sending to sink destination.
   - nodeDuration, the unit is millisecond, the duration is between current 
timepoint and the timepoint in getting event from source.
   - wholeDuration, the unit is millisecond, the duration is between current 
timepoint and the timepoint in generating event.
   
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe 
tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads 
(10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs 
/ not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup 
issue for adding the documentation
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to