How digma-ai/jaeger-ui works
Project Type and Purpose
• This is a monorepo‐based frontend application for visualizing distributed traces (Jaeger UI).
• It contains two Lerna‐managed packages:
– packages/jaeger-ui: the main React/Redux UI app built with Create-React-App (CRA)/Vite, TypeScript, CSS, tests.
– packages/plexus: a reusable directed‐graph layout library used by the UI for dependency/trace graphs.
File Structure
• Top-level files: CI/CD configs (.github/workflows), Dockerfile, Nginx template, BUILD.md, scripts, Lerna config.
• Two package folders:
– jaeger-ui/ (UI source, build output, Vite/CRA config, assets)
– plexus/ (graph library, demo server, Webpack configs)
• Shared dev tooling: ESLint, Prettier, TypeScript configs, Yarn workspace, Docker.
• CI/CD pipelines orchestrate lint, tests, builds, Docker image creation, release via GitHub Actions.
README Insights
• UI runs on a local dev server (CRA/Vite on :3000), hot-reload, proxies API calls (/api) to Jaeger Query (default http://localhost:16686).
• Production build produces static assets under packages/jaeger-ui/build; these can be served by any static server (e.g. Nginx).
• UI Configuration is externalized (UI base-path, Google Analytics, etc.).
Main Components & Their Relationships
a. Frontend Dev/Build Flow
– Developer invokes yarn start → CRA/Vite Dev Server
• Serves React app on :3000
• Proxies API calls to Jaeger Query backend
– Developer runs yarn build → Webpack/Vite build → Static bundle (/build)
– Dockerfile/Nginx: containerize static assets + Nginx serves on port 80
b. Runtime Client Architecture
– React Components ↔ Redux Store (Actions/Reducers/Selectors)
– API Layer
• src/api/jaeger.ts calls Jaeger Query JSON HTTP API
• src/api/digma/ integrates the Digma JSON-RPC plugin
– Visualization
• Graphing: uses plexus package for DAG and force-graph layouts
• Other UI modules: SearchTracePage, TracePage, TraceDiff, QualityMetrics, DependencyGraph, Monitor
c. External Services
– Jaeger Query Service (HTTP JSON API) connecting to tracing storage (Elasticsearch/Cassandra)
– Optional Digma backend (JSON-RPC over WebSocket)
– Analytics (Google Analytics or other via UI config)
– GitHub Actions & Docker registry (for CI/CD)
Architectural Patterns & Principles
• Monorepo with Lerna/Yarn workspaces: separate concerns (UI vs. graph library) but share dependencies.
• Modular React + Redux: slices per feature (trace search, trace view, diff, metrics).
• Thin API client layer: keeps fetch logic separate from components.
• Reusable visualization core (plexus): independent demo server → decoupled graph engine.
• CI/CD automation: build/test lint pipelines in GitHub Actions, Docker image assembly, version bumping.