Zipkin with docker startup script

In a project we use for distributed tracing. During development is is very handy to trace to Zipkin running in a Docker image. The following PowerShell script will help with (re)starting the Docker image on WIndows and open Zipkin in Chrome when it is running.

$runningZipkin = & docker ps -q --filter ancestor=openzipkin/zipkin
if ($runningZipkin) {
"Running Zipkin with id $runningZipkin - will be killed"
& docker stop $runningZipkin
"Starting Zipkin docker image"
& docker run -d -p 9411:9411 openzipkin/zipkin

$ErrorActionPreference = "SilentlyContinue" # We don't want to see failing requests
do {
Start-Sleep -Seconds 1
"Waiting for starting of Zipkin..."
$up = Invoke-WebRequest -Uri http://localhost:9411
} while (!$up)

& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://localhost:9411

No Comments

Add a Comment

As it will appear on the website

Not displayed

Your website