Jaeger is an open source system for distributed tracing. It helps you follow a request across services, measure latency, and spot failures. If you run microservices, Jaeger gives you a clear view of how calls flow through your stack.
The Jaeger Tracing Backstage plugin brings that view into your developer portal. It adds a Traces page to each service so engineers can search recent traces, open a trace, and scan spans in a table. You can filter by time range or operation to zero in on the path you care about. The trace detail shows timing, parent child relationships, and durations. This keeps people in one place during incidents and cuts the time from finding a problem to understanding it.
Typical use cases include on call triage, verifying a deploy, and exploring how a new dependency affects latency. It also helps new teammates learn how a service talks to its neighbors without leaving Backstage.
Installation Instructions
These instructions apply to self-hosted Backstage only.
Install the frontend package
- From your Backstage root
yarn add --cwd packages/app @backstage-community/plugin-jaeger
Configure the proxy endpoint
- Add a proxy entry in app config
# app-config.yaml proxy: endpoints: '/jaeger-api': target: ${JAEGAR_API_URL} pathRewrite: '^/api/proxy/jaeger-api': ''
- Set the environment variable when you run Backstage
export JAEGAR_API_URL="https://your-jaeger-query-url"
Enable the proxy in the legacy backend
If your backend already includes the proxy plugin you can skip this section.
- Add the backend dependency
yarn add --cwd packages/backend @backstage/plugin-proxy-backend
- Create the proxy router
// packages/backend/src/plugins/proxy.ts import { createRouter } from '@backstage/plugin-proxy-backend'; import { PluginEnvironment } from '../types'; export default async function createPlugin(env: PluginEnvironment) { return await createRouter({ logger: env.logger, config: env.config, discovery: env.discovery, cache: env.cache, urlReader: env.reader, }); }
- Mount the proxy under the api router
// packages/backend/src/index.ts import proxy from './plugins/proxy'; // inside the main bootstrap function where apiRouter is created // apiRouter is mounted at /api elsewhere in this file const proxyEnv = useHotMemoize(module, () => createEnv('proxy')); apiRouter.use('/proxy', await proxy(proxyEnv));
Enable the proxy in the new backend system
If your backend already adds the proxy plugin you can skip this section.
- Add the backend dependency
yarn add --cwd packages/backend @backstage/plugin-proxy-backend
- Add the plugin in the backend entry point
// packages/backend/src/index.ts import { createBackend } from '@backstage/backend-defaults'; import { proxyPlugin } from '@backstage/plugin-proxy-backend'; const backend = createBackend(); backend.add(proxyPlugin()); backend.start();
Add the Jaeger card to the service page
- Import the component in your entity page
// packages/app/src/components/catalog/EntityPage.tsx import React from 'react'; import { EntityLayout } from '@backstage/plugin-catalog'; import { JaegerCard } from '@backstage-community/plugin-jaeger'; const serviceEntityPage = ( <EntityLayout> <EntityLayout.Route path="/" title="Overview"> {overviewContent} </EntityLayout.Route> <EntityLayout.Route path="/ci-cd" title="CI/CD"> {cicdContent} </EntityLayout.Route> <EntityLayout.Route path="/jaeger" title="Traces"> <JaegerCard /> </EntityLayout.Route> </EntityLayout> ); export default serviceEntityPage;
- Optional hide the tab when the entity lacks annotations
// packages/app/src/components/catalog/EntityPage.tsx import { JaegerCard, isJaegerAvailable, } from '@backstage-community/plugin-jaeger'; const serviceEntityPage = ( <EntityLayout> {/* other routes */} <EntityLayout.Route if={isJaegerAvailable} path="/jaeger" title="Traces"> <JaegerCard /> </EntityLayout.Route> </EntityLayout> );
Annotate your entities
Add annotations to each service that you want to show traces for.
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: petstore
annotations:
jaegertracing.io/service: petstore
jaegertracing.io/lookback: 30m
jaegertracing.io/limit: 20
jaegertracing.io/operation: /
spec:
type: service
lifecycle: experimental
owner: guests
What this plugin exports
- Import these in your app where needed
// component for the service page import { JaegerCard } from '@backstage-community/plugin-jaeger'; // helper to conditionally show the route import { isJaegerAvailable } from '@backstage-community/plugin-jaeger'; // the plugin object for advanced use import { jaegerPlugin } from '@backstage-community/plugin-jaeger';
Changelog
The Jaeger Tracing plugin has not seen any significant changes since 6 months ago.
Set up Backstage in minutes with Roadie
Focus on using Backstage, rather than building and maintaining it.