DocumentsJaeger
Jaeger UI Frontend
Jaeger UI Frontend
Type
Topic
Status
Published
Created
Jul 7, 2026
Updated
Jul 7, 2026
Created by
Dosu Bot
Updated by
Dosu Bot

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:

ComponentPath
Git submodule config.gitmodules
Asset embeddingui/assets.go
Static handler (injection)static_handler.go
Query options / UI config structflags.go
Build targetsBuildBinaries.mk
UI config documentationfrontend-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:

  1. make rebuild-ui invokes scripts/build/rebuild-ui.sh which runs yarn build inside the submodule.
  2. The build-ui Make target copies build artifacts from $(JAEGER_UI_DIR)/packages/jaeger-ui/build/ into cmd/jaeger/internal/extension/jaegerquery/internal/ui/actual/, then gzips every file .
  3. Go's //go:embed actual/* directive bundles the .gz files 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 replacedValue injectedSource
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 configured
  • metricsStorage — whether metrics (SPM) storage is configured
  • aiAssistant — whether the AI chat sidecar is healthy (checked via aiHealthCheck())

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 :

OptionDescription
themes.enabledEnable light/dark toggle button (default: false)
dependencies.menuEnabledShow Dependencies tab (default: true)
monitor.menuEnabledShow Monitor/SPM tab (default: false)
archiveEnabledShow archive button (default: false)
tracking.gaIDGoogle Analytics ID
menuExtra nav items added to the right of the top bar
search.maxLimit / search.maxLookbackBound the search form inputs
linkPatternsTemplate-based deep links from span/trace fields
criticalPathEnabledHighlight critical path in trace view (default: true)
traceIdDisplayLengthChars of trace ID shown (default: 7)
topTagPrefixesPrefixes that float matching span tags to the top
disableFileUploadControl / disableJsonView / forbidNewPageControls 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.

Jaeger UI Frontend | Dosu