I have a very big problem I'm struggling with for 3 days.
I use docker swarm on the remote server. 20 microservices are in the same network NetA and stack StackA.
Now I want to add Zipkin and Sleuth to my microservices to trace all requests.
All microservices are made by docker-compose file that looks like:
version: '3'
services:
myservice1:
image: myImage1
depends_on:
- myService2
- myService3
ports:
- "8081:80"
environment:
- TZ=Europe/Warsaw
myservice3:
image: myImage2
environment:
- profile=${MY_PROFILE}
- TZ=Europe/Warsaw
...
Now the question is - HOW to ADD Zipkin Server?
I've added Zipkin server from Docker Hub Image.
NOW my ZIpkin Service is: - in a separate network ZIPN - in a separate stack ZIPST
What should I do to send data do Zipkin by all my microservices? What URL should i send in properties file: spring.zipkin.base-url=http://zipkinserver_network_zipkin_server:9411/
Should it be maybe: -container name (like my_zipkin_server) - but I use swarm so container name changes dynamically? - network name?
I added an additional network NetA to my Zipkin container but it didn't solved my problem - there are no traces in my Zipkin UI.
Please help me, I spent 4 days with this problem without any success.
Zipkin server should be in a separate Stack because will be used by different applications.
There is only ONE case when Zipkin works: when I set Zipkin container name:
spring.zipkin.base-url=http://zipkinserver_container_name:9411/