我使用官方 tutourial 的 18.5.5.7.2. TCP echo server using streams url 是 https://docs.python.org/3/library/asyncio-protocol.html
然后发送一堆 4 个 json 数据,但是这个 tutourial 只能无限循环第一个,这是为什么呢?
接收结果: {"duration": 6909, "timestamp": 1508925087312791, "annotations": [{"host": null, "value": "GET", "key": "http.method", "annotation_type": 6}, {"host": null, "value": "http://localhost:8081/format", "key": "http.url", "annotation_type": 6}], "name": "formatString", "parent_id": 2405405279606511970}{"duration": 5586, "timestamp": 1508925087320016, "annotations": [{"host": null, "value": "GET", "key": "http.method", "annotation_type": 6}, {"host": null, "value": "http://localhost:8082/publish", "key": "http.url", "annotation_type": 6}], "name": "printHello", "parent_id": 2405405279606511970}{"duration": 13221, "timestamp": 1508925087312715, "annotations": [{"host": null, "value": "const", "key": "sampler.type", "annotation_type": 6}, {"host": null, "value": "True", "key": "sampler.param", "annotation_type": 6}, {"host": null, "value": "Python-3.6.1", "key": "jaeger.version", "annotation_type": 6}, {"host": null, "value": "workvm", "key": "jaeger.hostname", "annotation_type": 6},
发送的数据为: {'duration': 6909, 'timestamp': 1508925087312791, 'annotations': [{'host': None, 'value': 'GET', 'key': u'http.method', 'annotation_type': 6}, {'host': None, 'value': 'http://localhost:8081/format', 'key': u'http.url', 'annotation_type': 6}], 'name': u'formatString', 'parent_id': 2405405279606511970}
{'duration': 5586, 'timestamp': 1508925087320016, 'name': u'printHello', 'parent_id': 2405405279606511970, 'annotations': [{'host': None, 'key': u'http.method', 'value': 'GET', 'annotation_type': 6}, {'host': None, 'key': u'http.url', 'value': 'http://localhost:8082/publish', 'annotation_type': 6}]}
{'duration': 13221, 'timestamp': 1508925087312715, 'name': u'say-hello', 'parent_id': None, 'annotations': [{'host': None, 'key': u'sampler.type', 'value': 'const', 'annotation_type': 6}, {'host': None, 'key': u'sampler.param', 'value': 'True', 'annotation_type': 6}, {'host': None, 'key': u'jaeger.version', 'value': 'Python-3.6.1', 'annotation_type': 6}, {'host': None, 'key': u'jaeger.hostname', 'value': 'workvm', 'annotation_type': 6}, {'host': None, 'key': u'hello-to', 'value': 'yyy123', 'annotation_type': 6}]}
{