Check http protocol in Python agent as well (#4805)
This commit is contained in:
parent
fed62aa731
commit
edd8305fa2
|
|
@ -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]}
|
||||
|
|
|
|||
Loading…
Reference in New Issue