You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/20 02:03:39 UTC

[GitHub] [apisix] juzhiyuan commented on a diff in pull request #7086: docs: update "Tracers" Plugins

juzhiyuan commented on code in PR #7086:
URL: https://github.com/apache/apisix/pull/7086#discussion_r877671268


##########
docs/en/latest/plugins/skywalking.md:
##########
@@ -69,104 +129,80 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f1
 }'
 ```
 
-You also can complete the above operation through the web interface, first add a route, then add SkyWalking plugin:
-
-![ ](../../../assets/images/plugin/skywalking-1.png)
+<!-- You also can complete the above operation through the web interface, first add a route, then add SkyWalking plugin:
 
-## How to set endpoint
+![ ](../../../assets/images/plugin/skywalking-1.png) -->
 
-We can set the endpoint by specifying the configuration in `conf/config.yaml`.
+## Example usage
 
-| Name         | Type   | Default  | Description                                                          |
-| ------------ | ------ | -------- | -------------------------------------------------------------------- |
-| service_name | string | "APISIX" | service name for SkyWalking reporter                                 |
-| service_instance_name | string |"APISIX Instance Name" | service instance name for SkyWalking reporter,  set it to `$hostname` to get local hostname directly.|
-| endpoint_addr | string | "http://127.0.0.1:12800" | the HTTP endpoint of SkyWalking, for example: http://127.0.0.1:12800 |
-| report_interval | integer | use the value in the SkyWalking client library | the report interval, in seconds |
+First, you need to have your SkyWalking server running.
 
-Here is an example:
+You can run it on Docker by:
 
-```yaml
-plugin_attr:
-  skywalking:
-    service_name: APISIX
-    service_instance_name: "APISIX Instance Name"
-    endpoint_addr: http://127.0.0.1:12800
+```shell
+sudo docker run --name skywalking -d -p 1234:1234 -p 12800:12800 --restart always apache/skywalking-oap-server:8.7.0-es6
 ```
 
-## Test Plugin
+:::tip
 
-### Run SkyWalking Example
+By default, SkyWalking uses H2 storage. You can also use Elasticsearch storage instead.
 
-1. Start the SkyWalking OAP Server:
-    - By default, SkyWalking uses H2 storage, start SkyWalking directly by
+First, install Elasticsearch. You can do it on Docker by running:
 
-        ```shell
-        sudo docker run --name skywalking -d -p 1234:1234 -p 12800:12800 --restart always apache/skywalking-oap-server:8.7.0-es6
-        ```
+```shell
+sudo docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 --restart always -e "discovery.type=single-node" elasticsearch:6.7.2
+```
 
-    - Of Course, you may want to use Elasticsearch storage instead
+Optionally, you can install Elasticsearch management page, elasticsearch-hq:
 
-        1. First, you should install Elasticsearch:
+```shell
+sudo docker run -d --name elastic-hq -p 5000:5000 --restart always elastichq/elasticsearch-hq
+```
 
-            ```shell
-            sudo docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 --restart always -e "discovery.type=single-node" elasticsearch:6.7.2
-            ```
+Once you have Elasticsearch installed, you can start a SkyWalking server by running:
 
-        2. Optionally, you can install ElasticSearch management page: elasticsearch-hq
+```shell
+sudo docker run --name skywalking -d -p 1234:1234 -p 12800:12800 --restart always --link elasticsearch:elasticsearch -e SW_STORAGE=elasticsearch -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:8.7.0-es6
+```
 
-            ```shell
-            sudo docker run -d --name elastic-hq -p 5000:5000 --restart always elastichq/elasticsearch-hq
-            ```
+:::
 
-        3. Finally, run SkyWalking OAP server:
+You can also install SkyWalking UI to view the data. To run it on Docker:
 
-            ```shell
-            sudo docker run --name skywalking -d -p 1234:1234 -p 12800:12800 --restart always --link elasticsearch:elasticsearch -e SW_STORAGE=elasticsearch -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:8.7.0-es6
-            ```
+```shell
+sudo docker run --name skywalking-ui -d -p 8080:8080 --link skywalking:skywalking -e SW_OAP_ADDRESS=skywalking:12800 --restart always apache/skywalking-ui
+```
 
-2. SkyWalking Web UI:
-    1. Run SkyWalking web UI Server:
+You should be able to access the UI from your browser:
 
-        ```shell
-        sudo docker run --name skywalking-ui -d -p 8080:8080 --link skywalking:skywalking -e SW_OAP_ADDRESS=skywalking:12800 --restart always apache/skywalking-ui
-        ```
+<!-- ![ ](../../../assets/images/plugin/skywalking-3.png) -->
 
-    2. Access the web UI of SkyWalking:
-        You can access the dashboard from a browser: http://10.110.149.175:8080 It will show the following
-        if the installation is successful.
-        ![ ](../../../assets/images/plugin/skywalking-3.png)
+Now if you make requests to APISIX:
 
-3. Test:
+```shell
+curl -v http://10.110.149.192:9080/uid/12
+```
 
-    - Access to upstream services through accessing APISIX:
+```shell
+HTTP/1.1 200 OK
+OK
+...
+```
 
-        ```bash
-        $ curl -v http://10.110.149.192:9080/uid/12
-        HTTP/1.1 200 OK
-        OK
-        ...
-        ```
+You should be able to see the topology of all services in your SkyWalking UI:
 
-    - Open the web UI of SkyWalking:
+![ ](../../../assets/images/plugin/skywalking-4.png)\

Review Comment:
   ```suggestion
   ![ ](../../../assets/images/plugin/skywalking-4.png)
   ```



-- 
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@apisix.apache.org

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