I am prototyping the use of Jaeger in an ASP.NET Core (3.1) Web API using the Jaeger C# Client and I got it working with the All in One approach they mention in their Getting Started documentation. This works fine for initial prototyping but I also wanted to test with storing to an instance of ElasticSearch. Luckily, I found another Stack Overflow post about this which contains a docker-compose.yaml for deploying Elastic Search and all the Jaeger components and I got that working after a few tweaks to the slightly outdated docker-compose (details in my answer for that post).
However, while digging through the Jaeger documentation, I found the CLI Flags reference for the jaeger-all-in-one distribution that seems to contradict itself. First, it says
Jaeger all-in-one distribution with agent, collector and query. Use with caution this version by default uses only in-memory database.
But then it also proceeds to say
jaeger-all-in-one can be used with these storage backends:
and then lists jager-all-in-one distribution CLI Flag details for:
So this implies that the Jaeger All in One distribution can be used with Elastic Search, etc. I am guessing the initial comment about the all-in-one distribution only supporting an in-memory database applies to the jaeger-all-in-one with memory option and not the others as otherwise it doesn't make sense.
Can someone with Jaeger experience clarify?
It's not clear in the documentation, but I managed to get it working by providing the SPAN_STORAGE_TYPE
and the respective connection details to allow the jaeger components to talk to the storage running outside of the all-in-one container.
For instance, I'm running elasticsearch on my Mac, so I used the following command to run all-in-one:
docker run -d --name jaeger-es \
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
-e SPAN_STORAGE_TYPE=elasticsearch \
-e ES_SERVER_URLS=http://host.docker.internal:9200 \
-p 5775:5775/udp \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14268:14268 \
-p 14250:14250 \
-p 9411:9411 \
jaegertracing/all-in-one:1.20