liqian 3 years ago
parent
commit
2ce72a35e1
1 changed files with 6 additions and 7 deletions
  1. 6 7
      app.py

+ 6 - 7
app.py

@@ -1,3 +1,9 @@
+# 导入skywalking链路监控
+from skywalking import agent, config
+config.init(collector='skywalking.piaoquantv.com:11800', service='rov-server')
+config.flask_collect_http_params = True
+agent.start()
+
 import json
 import json
 import time
 import time
 
 
@@ -15,13 +21,6 @@ from multiprocessing import cpu_count, Process
 from utils import update_video_w_h_rate
 from utils import update_video_w_h_rate
 # from werkzeug.middleware.profiler import ProfilerMiddleware
 # from werkzeug.middleware.profiler import ProfilerMiddleware
 from gevent import monkey
 from gevent import monkey
-
-# 导入skywalking链路监控
-# from skywalking import agent, config
-# config.init(collector='skywalking.piaoquantv.com:11800', service='rov-server')
-# config.flask_collect_http_params = True
-# agent.start()
-
 monkey.patch_all()
 monkey.patch_all()
 
 
 app = Flask(__name__)
 app = Flask(__name__)