Jaeger UI Frontend#
The Jaeger UI is a React/TypeScript single-page application maintained in a separate repository (jaegertracing/jaeger-ui) and tracked as a Git submodule at jaeger-ui/ in the main backend repo . This separation lets the UI release independently from the backend. At runtime, the compiled assets are embedded directly in the jaeger binary and served by the jaegerquery extension.
Key source entry points:
| Component | Path |
|---|---|
| Git submodule config | .gitmodules |
| Asset embedding | ui/assets.go |
| Static handler (injection) | static_handler.go |
| Query options / UI config struct | flags.go |
| Build targets | BuildBinaries.mk |
| UI config documentation | frontend-ui.md |
Asset Embedding and Build Pipeline#
The UI is built from source (or pulled from the jaeger-ui submodule) and embedded into the Go binary at compile time.
Build flow:
make rebuild-uiinvokesscripts/build/rebuild-ui.shwhich runsyarn buildinside the submodule.- The
build-uiMake target copies build artifacts from$(JAEGER_UI_DIR)/packages/jaeger-ui/build/intocmd/jaeger/internal/extension/jaegerquery/internal/ui/actual/, then gzips every file . - Go's
//go:embed actual/*directive bundles the.gzfiles into the binary at compile time .
At startup, GetStaticFiles() checks whether actual/index.html.gz is present. If so, it wraps the embedded filesystem with gzipfs.New() for transparent decompression; otherwise it falls back to a non-functional placeholder index.html with a warning . This fallback prevents binary build failures in development when the UI hasn't been built yet.
A custom assets path can be supplied at runtime via ui.assets_path (overriding the embedded bundle entirely), enabling local UI development without rebuilding the binary .
Dynamic Injection into index.html#
Every SPA page load triggers deriveIndexHTML(), which performs three regex substitutions on the raw index.html bytes before sending them to the browser:
| Pattern replaced | Value injected | Source |
|---|---|---|
JAEGER_CONFIG = DEFAULT_CONFIG; | JSON from the UI config file | |
JAEGER_VERSION = DEFAULT_VERSION; | Build version info from version.Get() | |
JAEGER_BACKEND_CAPABILITIES = DEFAULT_BACKEND_CAPABILITIES; | Runtime storage/AI capabilities |
Because deriveIndexHTML() runs per request, capabilities that change at runtime — notably the aiAssistant flag, which reflects a live health-check against the AI sidecar — are always current without requiring a server restart .
BackendCapabilities struct :
archiveStorage— whether archive storage is configuredmetricsStorage— whether metrics (SPM) storage is configuredaiAssistant— whether the AI chat sidecar is healthy (checked viaaiHealthCheck())
UI config caching: The config file is read eagerly at startup for early error detection, then re-read lazily with a 10-second TTL . On reload errors, the previously cached value is kept so a transient disk failure doesn't break page loads . Config files can be .json (parsed and re-serialized) or .js (must define a function UIConfig() {}) .
UI Configuration Options#
The config file is wired in via the jaeger_query extension in the collector YAML :
extensions:
jaeger_query:
ui:
config_file: /path/to/config-ui.json
The full JSON schema lives in jaeger-ui/src/types/config.ts. Key options :
| Option | Description |
|---|---|
themes.enabled | Enable light/dark toggle button (default: false) |
dependencies.menuEnabled | Show Dependencies tab (default: true) |
monitor.menuEnabled | Show Monitor/SPM tab (default: false) |
archiveEnabled | Show archive button (default: false) |
tracking.gaID | Google Analytics ID |
menu | Extra nav items added to the right of the top bar |
search.maxLimit / search.maxLookback | Bound the search form inputs |
linkPatterns | Template-based deep links from span/trace fields |
criticalPathEnabled | Highlight critical path in trace view (default: true) |
traceIdDisplayLength | Chars of trace ID shown (default: 7) |
topTagPrefixes | Prefixes that float matching span tags to the top |
disableFileUploadControl / disableJsonView / forbidNewPage | Controls for embedding scenarios |
The UIConfig struct in flags.go exposes three server-side fields: config_file, assets_path, and log_access.
Theming (Light / Dark Mode)#
Theme support is opt-in via themes.enabled in the config file . When enabled, a toggle button appears in the top navigation bar. The selected theme is persisted in localStorage; if no stored preference exists, the UI respects the OS-level prefers-color-scheme media query. When disabled (the default), the UI always renders in light mode .
Embedded Mode#
The UI supports an embedded layout mode for integrating into third-party applications. It is activated by adding uiEmbed=v0 to any URL , e.g.:
http://localhost:16686/trace/abc123?uiEmbed=v0
This strips chrome elements to reduce visual footprint. Supported pages: Search and Trace. Additional query parameters control the layout further — for example, uiSearchHideGraph=1 removes the scatter plot and uiTimelineHideMinimap=1 removes the minimap . See the full documentation for the complete parameter reference.