openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
17.02k stars 3.09k forks source link

lens: adds zipkin-uiproxy image and fixes ZIPKIN_UI_BASEPATH #3751

Closed codefromthecrypt closed 8 months ago

codefromthecrypt commented 8 months ago

This adds a new test image zipkin-uiproxy which allows us to verify the ZIPKIN_UI_BASEPATH. This allowed me to notice and fix the following glitches since we migrated to vite:

codefromthecrypt commented 8 months ago

Here's where I got.

diff --git a/docker/examples/docker-compose-uiproxy.yml b/docker/examples/docker-compose-uiproxy.yml
index a01658436..a94ff1634 100644
--- a/docker/examples/docker-compose-uiproxy.yml
+++ b/docker/examples/docker-compose-uiproxy.yml
@@ -13,7 +13,7 @@ version: '2.4'

 services:
   zipkin-uiproxy:
-    image: ghcr.io/openzipkin/zipkin-uiproxy:${TAG:-latest}
+    image: openzipkin/zipkin-uiproxy:test
     container_name: zipkin-uiproxy
     environment:
       # This allows hitting the UI on the host by http://localhost/admin/zipkin
diff --git a/docker/examples/docker-compose.yml b/docker/examples/docker-compose.yml
index 1210bb8d5..b37c6fed0 100644
--- a/docker/examples/docker-compose.yml
+++ b/docker/examples/docker-compose.yml
@@ -17,7 +17,7 @@ services:
   # The zipkin process services the UI, and also exposes a POST endpoint that
   # instrumentation can send trace data to.
   zipkin:
-    image: ghcr.io/openzipkin/zipkin-slim:${TAG:-latest}
+    image: openzipkin/zipkin-slim:test
     container_name: zipkin
     # Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
     environment:
diff --git a/zipkin-lens/vite.config.ts b/zipkin-lens/vite.config.ts
index d8b1b994e..2b9b53839 100644
--- a/zipkin-lens/vite.config.ts
+++ b/zipkin-lens/vite.config.ts
@@ -39,6 +39,7 @@ export default defineConfig(():UserConfig => {
       outDir: 'build',
       // use the same path patterns as the original react-scripts lens build
       assetsDir: "static",
+      sourcemap: true,
       rollupOptions: {
         output: {
           assetFileNames({name}):string {
$ ./mvnw -T1C -q --batch-mode -DskipTests --also-make -pl zipkin-server clean install
$ DOCKER_TARGET=zipkin-slim build-bin/docker/docker_build openzipkin/zipkin-slim:test
$ DOCKER_FILE=docker/test-images/zipkin-uiproxy/Dockerfile build-bin/docker/docker_build openzipkin/zipkin-uiproxy:test
$ cd docker/examples
$ docker-compose -f docker-compose.yml -f docker-compose-uiproxy.yml up

then http://localhost/admin/zipkin/ and add a breakpoint in api.tsx you can see at least for API calls the variable is passing through. Maybe some other code is controlling the window location and it isn't aware of the BASE_PATH?

Screenshot 2024-03-06 at 11 53 46
codefromthecrypt commented 8 months ago

working except the logo is still served from /zipkin not /admin/zipkin..

codefromthecrypt commented 8 months ago

ok I have it working and verified in the proxy-pass image (zipkin-uiproxy)