-
Notifications
You must be signed in to change notification settings - Fork 155
3.8.0 doesn't report spans in Python 3 #137
Comments
should have mentioned this in the release notes - the new version finally has support for sending native jaeger.thrift format, that goes to a different port
|
Please let me know if this solves the issue. |
Hi @yurishkuro! I figured the port change meant something like that, but it wasn't clear whether I have to make any other config changes to have Python client output jaeger thrift, or should it just work? As I said above, I'm using jaeger all-in-one docker image with both the 5775 zipkin thrift and 6831 jaeger thrift ports exposed. But in 3.8.0, regardless of whether I leave config as default, or explicitly set the port to either 5775 or 6831, nothing gets shown in the Jaeger UI (whereas in 3.7.1 I see spans recorded when using 5775). |
I just ran all-in-one
and ran the tutorial
The span was reported correctly There is no special configuration for the tracer: https://github.com/yurishkuro/opentracing-tutorial/blob/master/python/lib/tracing.py |
@yurishkuro is that using Python 2 or 3? I suspect this might be the issue. I'm using Python 3. If I run with 3.7.1 and in a separate terminal do
and correspondingly the spans make it to the collector/UI. If I run with 3.8.0 (changing the port to 6831), I see no UDP packets logged at all |
I ran with python 2. We do not officially support Python 3, and don't test with it, so a regression is possible (but unfortunate). If you are able to troubleshoot this with py3 it would be very helpful. |
One thing I noticed was a comment in setup.py about pinning the thrift version which I wasn't doing. So I set it to 0.9.2 (also tried 0.9.3), because I was getting 0.11 previously. That didn't make a difference though. With println debugging I can see that the basic steps in reporter.py seem to happen indentically. However, I do see that the TUDPTransport.write() is never called in 3.8.0 while it is in 3.7.1. I'll keep trying to narrow down why that is. |
@yurishkuro I'm made progress: I found that send_emitBatch never seemed to result in a call to TUDPTransport.write() as it should. It appears the Tag keys and values are coming in as byte strings e.g. (from my added debug logging)
and that causes the If that method has to stay the way it is, we need to decode in write e.g.:
which enables it to get further. There's an additional wrinkle: Later on in the set of tags it's trying to write the Const sampler tag with its "decision" value, which is a boolean, though it looks like the assumption is made in thrift.py that all tags are string tags. I edited https://github.com/jaegertracing/jaeger-client-python/blob/master/jaeger_client/sampler.py#L90 to wrap I'd send the above as a PR but I'm not clear if they're the right fixes, nor what impact any changes would have on the Python 2 flow. |
I should also add that the thrift version changes I mentioned above were a bad idea. Setting thrift to 0.9.2 or 0.9.3 actually seemed to break 3.7.1 for me. I didn't notice this the first time I made the change because I forgot to pip install the changes to the requirements file. I've gone back to explicitly using latest thrift (0.11) and that's working for 3.8.0 and 3.7.1 (on Python 3) |
Same problem for me with |
I can't get a python3 (flask) app to run regardless of of the jager-client/opentracing versions. (everything works perfectly fine in Python2) Desperately awaiting python3 support, all our code is based on python3.5 or 3.6. |
thrift 0.9.3 don't support python3 |
@bohea jaeger does not require you to use 0.9.3, I believe it works even if you pick a higher version that is py3 compatible (that's how people were able to run it before on py3). |
I ran into an error today with python 3.6. It was due to this line: https://github.com/jaegertracing/jaeger-client-python/blob/master/jaeger_client/thrift.py#L55 In python3, the
|
Was able to fix this by replacing the
After this I was able to report spans successfully. Will open a separate issue |
Should be fixed by #154 |
I have a set of apps using the Go and Python jaeger client libs and the jaeger all-in-one docker image. They're all running in a docker-compose stack - so the apps can see the jaeger container & reach it via its hostname 'jaeger'. I also have the jaeger ports exposed on localhost so I can run sanity checks on the python code locally (e.g. jaeger all-in-one's docker ps looks like 0.0.0.0:5775->5775/udp, 5778/tcp, 0.0.0.0:6831-6832->6831-6832/udp, 14268/tcp, 0.0.0.0:16686->16686/tcp)
With 3.7.1 I was able to report spans correctly - running the python code locally while relying on the default reporter config (localhost:5775 in 3.7.1) and in docker (by setting local_agent/reporting_host to 'jaeger').
However, I had to upgrade to 3.8.0 to propagate spans from the Go app to Python app (because we're on Python 3 & 'extract' was relying on a Python 2 collection check. In 3.8.0 the default reporter config is localhost:6831.
On 3.8.0 I'm unable to get any spans reported correctly from Python app, whether locally (relying on default config) or in docker (setting reporting_host to 'jaeger'). I'm also unable to get it to work changing the port back to 5775 (both locally or in docker).
The logger still prints that it's reporting spans e.g.
but nothing makes it to the collector.
I see elsewhere that (#59) that Python3 is perhaps not supported - is that the root cause here? It seems like 3.8.0 was trying to address that somewhat. Is there anything else I need to change when upgrading from 3.7.1 to 3.8.0?
The text was updated successfully, but these errors were encountered: