router
router copied to clipboard
test_jaeger_tracing failing
Describe the bug
test_jaeger_tracing
fails on my machine
To Reproduce Steps to reproduce the behavior:
- Run
docker compose up --build
- In another terminal, run
cargo xtask test
- See test fail with the output below
Expected behavior
DEVELOPMENT.md
should have sufficient instructions to make tests pass for local development
Output
headers: {"content-type": "application/json", "accept": "application/json", "uber-trace-id": "d1309c0722b360f8b8218792b1c37591:c6e7702d4a69c91d:0:1", "host": "localhost:4005", "content-length": "31"}
flush result: [Ok(())]
error: incomplete traces, got {} expected {"products", "router", "my_app"}
error: incomplete traces, got {} expected {"products", "router", "my_app"}
error: incomplete traces, got {} expected {"products", "router", "my_app"}
error: incomplete traces, got {} expected {"my_app", "router", "products"}
error: incomplete traces, got {} expected {"my_app", "router", "products"}
error: incomplete traces, got {} expected {"my_app", "router", "products"}
error: incomplete traces, got {} expected {"router", "products", "my_app"}
error: incomplete traces, got {} expected {"my_app", "router", "products"}
error: incomplete traces, got {} expected {"products", "my_app", "router"}
error: incomplete traces, got {} expected {"router", "my_app", "products"}
thread 'test_jaeger_tracing' panicked at 'did not get full otel trace', apollo-router/tests/jaeger_test.rs:66:5
Desktop (please complete the following information):
- OS: macOS
- Version: 12.4
Additional context Docker runs in an Ubuntu 22.04 VM, with TCP forwarding for ports 4000, 4001, 4002, 4003, 4004, 4100, 16686, and 14268.
With help from Bryn we’ve established that this is likely caused by traces sent by the Jaeger client within the router not reaching the Jaeger agent, because I’d need to also forward UDP port 6831
With that redirect in place, I now see UDP packets with Wireshark on the (virtual) machine running Docker, including one that contains the string my_app
:
This is a port number where something is listening:
❯ sudo netstat -ulnp | grep docker
udp 0 0 0.0.0.0:6831 0.0.0.0:* 25312/docker-proxy
udp 0 0 0.0.0.0:6832 0.0.0.0:* 25292/docker-proxy
udp6 0 0 :::6831 :::* 25319/docker-proxy
udp6 0 0 :::6832 :::* 25299/docker-proxy
… but I still don’t find anything with my_app
in Jaeger on http://localhost:16686/
This seems to a docker config issue rather than a bug. Running docker outside of a vm will likely resolve the issue. Let's close for now.