未验证 提交 edd8305f 编写于 作者: K kezhenxu94 提交者: GitHub

Check http protocol in Python agent as well (#4805)

上级 fed62aa7
......@@ -15,7 +15,7 @@
FROM python:3.7
ENV COMMIT_HASH=445d64c162555a3ff92b98e8ccec3cdc1a66876d
ENV COMMIT_HASH=1bfced8e967fb4a74f9ac2eabe3a9d01efab3d94
WORKDIR /app
......
......@@ -23,6 +23,8 @@ from skywalking import agent, config
if __name__ == '__main__':
config.service_name = 'consumer'
config.logging_level = 'DEBUG'
config.protocol = 'http'
config.collector_address = 'http://oap:12800'
agent.start()
import socketserver
......
......@@ -15,6 +15,8 @@
# limitations under the License.
#
import time
from urllib import request
from skywalking import agent, config
......@@ -30,12 +32,11 @@ if __name__ == '__main__':
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
def do_POST(self):
time.sleep(0.5)
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
req = request.Request('https://github.com/kezhenxu94')
with request.urlopen(req):
self.wfile.write('{"name": "whatever"}'.encode('ascii'))
self.wfile.write('{"name": "whatever"}'.encode('ascii'))
PORT = 9091
Handler = SimpleHTTPRequestHandler
......
......@@ -30,10 +30,6 @@ nodes:
name: Your_ApplicationName
type: Tomcat
isReal: true
- id: not null
name: github.com
type: Unknown
isReal: false
calls:
- id: not null
source: ${User[0]}
......@@ -52,8 +48,3 @@ calls:
- CLIENT
- SERVER
target: ${provider[0]}
- id: not null
source: ${provider[0]}
detectPoints:
- CLIENT
target: ${github.com[0]}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册