-
Notifications
You must be signed in to change notification settings - Fork 155
How to set Jaeger endpoint #47
Comments
The address of the agent is configured automatically (in Go as well), you do not need to provide it in the configuration. If you still really want to, you can override the port via: config = {
'local_agent': {
'reporting_port': number,
'sampling_port': number,
},
} |
OK.
It's not on the same host. |
I think Python client doesn't support talking to an agent on another host (it's also not recommended because clients use UDP to send the packets, which won't be lossless, unlike when talking over the loopback interface). A quick fix would be to extend Python client to support Longer term, we are having ongoing discussions about supporting reporting over HTTP. |
When an application running in docker container, i can't communicate with the jaeger agent by using localhost. So providing an |
I launch the all-in-one image :
Try this code : import opentracing
import logging
import time
from jaeger_client import Config
if __name__ == "__main__":
log_level = logging.DEBUG
logging.getLogger('').handlers = []
logging.basicConfig(format='%(asctime)s %(message)s', level=log_level)
config = Config(
config={ # usually read from some yaml config
'sampler': {
'type': 'const',
'param': 1,
},
'local_agent': {
'reporting_host': "127.0.0.1",
'reporting_port': 5775,
},
'logging': True,
},
service_name='my-app',
)
tracer = config.initialize_tracer()
with opentracing.tracer.start_span('TestSpan') as span:
span.log_event('test message', payload={'life': 42})
with opentracing.tracer.start_span('ChildSpan', child_of=span) as child_span:
span.log_event('down below')
time.sleep(2) # yield to IOLoop to flush the spans - https://github.com/uber/jaeger-client-python/issues/50
tracer.close() # flush any buffered spans And the output logs :
|
|
Yes, closing. @nlamirault the exception you showed is something inside tornado, could you please open a new issue with it and include the versions of the dependencies you're using? I have run https://github.com/yurishkuro/opentracing-tutorial/tree/master/python with the latest jaeger client and it had no issues (using Python 2.7) |
This is in response to [this issue](jaegertracing#47).
This is in response to [this issue](jaegertracing#47). Signed-off-by: Carlos Nunez <carlosonunez@noreply.github.com>
This is in response to [this issue](#47). Signed-off-by: Carlos Nunez <carlosonunez@noreply.github.com>
@yurishkuro What is the meaning of
|
Hi, i try to use the python version of the jaeger client.
In go i do that to create the tracer :
How do that in Python ?
Thanks
The text was updated successfully, but these errors were encountered: