You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/07/11 14:26:56 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #4972: [WIP] Provide server-side meter

wu-sheng commented on a change in pull request #4972:
URL: https://github.com/apache/skywalking/pull/4972#discussion_r453199611



##########
File path: docs/en/setup/backend/backend-meter.md
##########
@@ -0,0 +1,77 @@
+# Meter Receiver
+Meter receiver is accepting the metrics of [meter protocol](https://github.com/apache/skywalking-data-collect-protocol/blob/master/language-agent/Meter.proto) format into the [Meter System](./../../concepts-and-designs/meter.md).
+
+## Module define
+receiver-meter:
+  selector: ${SW_RECEIVER_METER:default}
+  default:
+
+## Configuration file
+Meter receiver is configured via a configuration file. The configuration file defines everything related to receiving 
+ from agents, as well as which rule files to load.
+ 
+OAP can load the configuration at bootstrap. If the new configuration is not well-formed, OAP fails to start up. The files
+are located at `$CLASSPATH/meter-receive-config`.
+
+The file is written in YAML format, defined by the scheme described below. Brackets indicate that a parameter is optional.
+
+A example can be found [here](../../../../oap-server/server-bootstrap/src/main/resources/meter-receive-config/meter-receive-config.yaml)
+
+### Meters configure
+
+```yaml
+# Meter config allow your to recompute
+meters:
+  # Meter name which combines with a prefix 'meter_' as the index/table name in storage.
+  - name: <string>
+    # The meter scope
+    scope:
+      # Scope type should be one of SERVICE, SERVICE_INSTANCE, ENDPOINT
+      type: <string>
+      # <Optional> Appoint the endpoint name if using ENDPOINT scope
+      endpoint: <string>
+    # The agent source of the transformation operation.
+    meter:
+      # The transformation operation from prometheus metrics to Skywalking ones. 
+      operation: <string>
+      # Meter value parse groovy script.
+      value: <string>
+      # <Optional> Appoint percentiles if using avgHistogramPercentile operation.
+      percentile:
+        - <rank>
+```
+
+#### Meter transform operation
+
+The available operations are `avg`, `avgHistogram` and `avgHistogramPercentile`. The `avg` and `avgXXX` mean to average
+the raw received metrics. 
+
+When you specify `avgHistogram` and `avgHistogramPercentile`, the source should be the type of `histogram`.
+
+#### Meter value script
+
+The script is provide a easy way to custom build a complex value, and it also support combine multiple meter into one.
+
+Use `meter[""]` to refer the metrics raw data, and multiple build-in methods to help filter or operate the value.

Review comment:
       We need grammar expressions. Take a look on SkyWalking's OAL doc and grammar expressions. 

##########
File path: dist-material/release-docs/LICENSE
##########
@@ -444,6 +444,7 @@ Apache 2.0 licenses
 ========================================
 echarts	4.1.0:	https://github.com/apache/incubator-echarts	Apache-2.0
 Material Icons 3.0.1 https://github.com/google/material-design-icons Apache-2.0
+groovy 3.0.3 https://github.com/apache/groovy Apache-2.0

Review comment:
       ```suggestion
   Material Icons 3.0.1 https://github.com/google/material-design-icons Apache-2.0
   groovy             3.0.3 https://github.com/apache/groovy Apache-2.0
   ```

##########
File path: docs/en/setup/backend/backend-meter.md
##########
@@ -0,0 +1,77 @@
+# Meter Receiver
+Meter receiver is accepting the metrics of [meter protocol](https://github.com/apache/skywalking-data-collect-protocol/blob/master/language-agent/Meter.proto) format into the [Meter System](./../../concepts-and-designs/meter.md).
+
+## Module define
+receiver-meter:
+  selector: ${SW_RECEIVER_METER:default}
+  default:
+
+## Configuration file
+Meter receiver is configured via a configuration file. The configuration file defines everything related to receiving 
+ from agents, as well as which rule files to load.
+ 
+OAP can load the configuration at bootstrap. If the new configuration is not well-formed, OAP fails to start up. The files
+are located at `$CLASSPATH/meter-receive-config`.
+
+The file is written in YAML format, defined by the scheme described below. Brackets indicate that a parameter is optional.
+
+A example can be found [here](../../../../oap-server/server-bootstrap/src/main/resources/meter-receive-config/meter-receive-config.yaml)

Review comment:
       This file is not available. Also at the same time, what is this file for?

##########
File path: docs/en/setup/backend/backend-meter.md
##########
@@ -0,0 +1,77 @@
+# Meter Receiver
+Meter receiver is accepting the metrics of [meter protocol](https://github.com/apache/skywalking-data-collect-protocol/blob/master/language-agent/Meter.proto) format into the [Meter System](./../../concepts-and-designs/meter.md).
+
+## Module define
+receiver-meter:
+  selector: ${SW_RECEIVER_METER:default}
+  default:
+
+## Configuration file
+Meter receiver is configured via a configuration file. The configuration file defines everything related to receiving 
+ from agents, as well as which rule files to load.
+ 
+OAP can load the configuration at bootstrap. If the new configuration is not well-formed, OAP fails to start up. The files
+are located at `$CLASSPATH/meter-receive-config`.
+
+The file is written in YAML format, defined by the scheme described below. Brackets indicate that a parameter is optional.
+
+A example can be found [here](../../../../oap-server/server-bootstrap/src/main/resources/meter-receive-config/meter-receive-config.yaml)

Review comment:
       Do you plan to have a config for Spring app?

##########
File path: oap-server/server-bootstrap/src/main/resources/meter-receive-config/config.yaml
##########
@@ -0,0 +1,358 @@
+# 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.
+
+meters:

Review comment:
       This file is in the official release, what is this for? `hikaricp` and many things are not in every app.
   This should a test config file, or example only.




----------------------------------------------------------------
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.

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