membphis commented on a change in pull request #3925:
URL: https://github.com/apache/apisix/pull/3925#discussion_r603401795



##########
File path: docs/en/latest/plugins/skywalking.md
##########
@@ -91,7 +91,8 @@ We can set the endpoint by specified the configuration in 
`conf/config.yaml`.
 | ------------ | ------ | -------- | 
-------------------------------------------------------------------- |
 | service_name | string | "APISIX" | service name for skywalking reporter      
                           |
 |service_instance_name|string|"APISIX Instance Name" | service instance name 
for skywalking reporter |
-| endpoint     | string | "http://127.0.0.1:12800"; | the http endpoint of 
Skywalking, for example: http://127.0.0.1:12800 |
+| endpoint_addr| string | "http://127.0.0.1:12800"; | the http endpoint of 
Skywalking, for example: http://127.0.0.1:12800 |

Review comment:
       nice catch!!

##########
File path: apisix/plugins/skywalking.lua
##########
@@ -127,8 +130,22 @@ function _M.init()
     metadata_shdict:set('serviceInstanceName', 
local_plugin_info.service_instance_name)
 
     local sk_cli = require("skywalking.client")
+    if local_plugin_info.report_interval then
+        sk_cli.backendTimerDelay = local_plugin_info.report_interval
+    end
+
     sk_cli:startBackendTimer(local_plugin_info.endpoint_addr)
 end
 
 
+function _M.destroy()
+    if process.type() ~= "worker" and process.type() ~= "single" then

Review comment:
       we can remove `process.type() ~= "single"`, right?




-- 
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:
us...@infra.apache.org


Reply via email to