Ukraine flag We stand with our friends and colleagues in Ukraine. To support Ukraine in their time of need visit this page.

Deployment


The main Jaeger backend components are released as Docker images on Docker Hub:

ComponentRepository
jaeger-agenthub.docker.com/r/jaegertracing/jaeger-agent/external link
jaeger-collectorhub.docker.com/r/jaegertracing/jaeger-collector/external link
jaeger-queryhub.docker.com/r/jaegertracing/jaeger-query/external link
jaeger-ingesterhub.docker.com/r/jaegertracing/jaeger-ingester/external link

There are orchestration templates for running Jaeger with:

Configuration Options

Jaeger binaries can be configured in a number of ways (in the order of decreasing priority):

  • command line arguments,
  • environment variables,
  • configuration files in JSON, TOML, YAML, HCL, or Java properties formats.

To see the complete list of options, run the binary with help command. Options that are specific to a certain storage backend are only listed if the storage type is selected. For example, to see all available options in the Collector with Cassandra storage:

$ docker run --rm \
    -e SPAN_STORAGE_TYPE=cassandra \
    jaegertracing/jaeger-collector:1.8.0 \
    help

In order to provide configuration parameters via environment variables, find the respective command line option and convert its name to UPPER_SNAKE_CASE, for example:

Command line optionEnvironment variable
--cassandra.connections-per-hostCASSANDRA_CONNECTIONS_PER_HOST
--metrics-backendMETRICS_BACKEND

Agent

Jaeger client libraries expect jaeger-agent process to run locally on each host. The agent exposes the following ports:

PortProtocolFunction
5775UDPaccept zipkin.thrift over compact thrift protocol
6831UDPaccept jaeger.thrift over compact thrift protocol
6832UDPaccept jaeger.thrift over binary thrift protocol
5778HTTPserve configs, sampling strategies

It can be executed directly on the host or via Docker, as follows:

## make sure to expose only the ports you use in your deployment scenario!
docker run \
  --rm \
  -p5775:5775/udp \
  -p6831:6831/udp \
  -p6832:6832/udp \
  -p5778:5778/tcp \
  jaegertracing/jaeger-agent:1.8.0

Discovery System Integration

The agents can connect point to point to a single collector address, which could be load balanced by another infrastructure component (e.g. DNS) across multiple collectors. The agent can also be configured with a static list of collector addresses.

On Docker, a command like the following can be used:

docker run \
  --rm \
  -p5775:5775/udp \
  -p6831:6831/udp \
  -p6832:6832/udp \
  -p5778:5778/tcp \
  jaegertracing/jaeger-agent:1.8.0 \
  --reporter.tchannel.host-port=jaeger-collector.jaeger-infra.svc:14267

In the future we will support different service discovery systems to dynamically load balance across several collectors (issue 213external link).

Collectors

The collectors are stateless and thus many instances of jaeger-collector can be run in parallel. Collectors require almost no configuration, except for the location of Cassandra cluster, via --cassandra.keyspace and --cassandra.servers options, or the location of Elasticsearch cluster, via --es.server-urls, depending on which storage is specified. To see all command line options run

go run ./cmd/collector/main.go -h

or, if you don’t have the source code

docker run -it --rm jaegertracing/jaeger-collector:1.8.0 -h

At default settings the collector exposes the following ports:

PortProtocolFunction
14267TChannelused by jaeger-agent to send spans in jaeger.thrift format
14268HTTPcan accept spans directly from clients in jaeger.thrift format over binary thrift protocol
9411HTTPcan accept Zipkin spans in JSON or Thrift (disabled by default)
14269HTTPHealth check at /

Storage Backends

Collectors require a persistent storage backend. Cassandra and Elasticsearch are the primary supported storage backends. Additional backends are discussed hereexternal link.

The storage type can be passed via SPAN_STORAGE_TYPE environment variable. Valid values are cassandra, elasticsearch, kafka (only as a buffer) and memory (only for all-in-one binary). As of version 1.6.0, it’s possible to use multiple storage types at the same time by providing a comma-separated list of valid types to the SPAN_STORAGE_TYPE environment variable. It’s important to note that all listed storage types are used for writing, but only the first type in the list will be used for reading and archiving.

Memory

The in-memory storage is not intended for production workloads. It’s intended as a simple solution to get started quickly and data will be lost once the process is gone.

By default, there’s no limit in the amount of traces stored in memory but a limit can be established by passing an integer value via --memory.max-traces.

Cassandra

Supported versions: 3.4+

Deploying Cassandra itself is out of scope for our documentation. One good source of documentation is the Apache Cassandra Docsexternal link.

Configuration

Minimal
docker run \
  -e SPAN_STORAGE_TYPE=cassandra \
  -e CASSANDRA_SERVERS=<...> \
  jaegertracing/jaeger-collector:1.8.0
All options

To view the full list of configuration options, you can run the following command:

docker run \
  -e SPAN_STORAGE_TYPE=cassandra  \
  jaegertracing/jaeger-collector:1.8.0 \
  --help

Schema script

A script is provided to initialize Cassandra keyspace and schema using Cassandra’s interactive shell cqlshexternal link:

MODE=test sh ./plugin/storage/cassandra/schema/create.sh | cqlsh

For production deployment, pass MODE=prod DATACENTER={datacenter} arguments to the script, where {datacenter} is the name used in the Cassandra configuration / network topology.

The script also allows overriding TTL, keyspace name, replication factor, etc. Run the script without arguments to see the full list of recognized parameters.

TLS support

Jaeger supports TLS client to node connections as long as you’ve configured your Cassandra cluster correctly. After verifying with e.g. cqlsh, you can configure the collector and query like so:

docker run \
  -e CASSANDRA_SERVERS=<...> \
  -e CASSANDRA_TLS=true \
  -e CASSANDRA_TLS_SERVER_NAME="CN-in-certificate" \
  -e CASSANDRA_TLS_KEY=<path to client key file> \
  -e CASSANDRA_TLS_CERT=<path to client cert file> \
  -e CASSANDRA_TLS_CA=<path to your CA cert file> \
  jaegertracing/jaeger-collector:1.8.0

The schema tool also supports TLS. You need to make a custom cqlshrc file like so:

# Creating schema in a cassandra cluster requiring client TLS certificates.
#
# Create a volume for the schema docker container containing four files:
# cqlshrc: this file
# ca-cert: the cert authority for your keys
# client-key: the keyfile for your client
# client-cert: the cert file matching client-key
#
# if there is any sort of DNS mismatch and you want to ignore server validation
# issues, then uncomment validate = false below.
#
# When running the container, map this volume to /root/.cassandra and set the
# environment variable CQLSH_SSL=--ssl
[ssl]
certfile = ~/.cassandra/ca-cert
userkey = ~/.cassandra/client-key
usercert = ~/.cassandra/client-cert
# validate = false

Elasticsearch

Supported in Jaeger since 0.6.0 Supported versions: 5.x, 6.x

Elasticsearch does not require initialization other than installing and running Elasticsearchexternal link. Once it is running, pass the correct configuration values to the Jaeger collector and query service.

Configuration

Minimal
docker run \
  -e SPAN_STORAGE_TYPE=elasticsearch \
  -e ES_SERVER_URLS=<...> \
  jaegertracing/jaeger-collector:1.8.0
All options

To view the full list of configuration options, you can run the following command:

docker run \
  -e SPAN_STORAGE_TYPE=elasticsearch \
  jaegertracing/jaeger-collector:1.8.0 \
  --help

See the READMEexternal link for an in-depth overview of how Jaeger uses Elasticsearch for storage.

Shards and Replicas for Elasticsearch indices

Shards and replicas are some configuration values to take special attention to, because this is decided upon index creation. This articleexternal link goes into more information about choosing how many shards should be chosen for optimization.

Kafka

Supported in Jaeger since 1.6.0 Supported Kafka versions: 0.9+

Starting from version 1.7.0, a new component Ingester was added to support reading from Kafka and storing it in another storage backend (Elasticsearch or Cassandra).

Writing to Kafka is particularly useful for building post-processing data pipelines.

Configuration

Minimal
docker run \
  -e SPAN_STORAGE_TYPE=kafka \
  -e KAFKA_BROKERS=<...> \
  -e KAFKA_TOPIC=<...> \
  jaegertracing/jaeger-collector:1.8.0
All options

To view the full list of configuration options, you can run the following command:

docker run \
  -e SPAN_STORAGE_TYPE=kafka \
  jaegertracing/jaeger-collector:1.8.0 \
  --help

Topic & partitions

Unless your Kafka cluster is configured to automatically create topics, you will need to create it ahead of time. You can refer to the Kafka quickstart documentationexternal link to learn how.

You can find more information about topics and partitions in general in the official documentationexternal link. This articleexternal link provide more details about how to choose the number of partitions.

Ingester

jaeger-ingester is a service which reads span data from Kafka topic and writes it to another storage backend (Elasticsearch or Cassandra).

PortProtocolFunction
14270HTTPHealth check at /
14271HTTPMetrics endpoint

To view all exposed configuration options run the following command:

docker run \
  -e SPAN_STORAGE_TYPE=cassandra \
  jaegertracing/jaeger-ingester:1.8.0 
  --help

Query Service & UI

jaeger-query serves the API endpoints and a React/Javascript UI. The service is stateless and is typically run behind a load balancer, e.g. nginx.

At default settings the query service exposes the following port(s):

PortProtocolFunction
16686HTTP/api/* endpoints and Jaeger UI at /
16687HTTPHealth check at /

UI Base Path

The base path for all jaeger-query HTTP routes can be set to a non-root value, e.g. /jaeger would cause all UI URLs to start with /jaeger. This can be useful when running jaeger-query behind a reverse proxy.

The base path can be configured via the --query.base-path command line parameter or the QUERY_BASE_PATH environment variable.

UI Configuration

Several aspects of the UI can be configured:

  • The Dependencies section can be enabled / configured
  • Google Analytics tracking can be enabled / configured
  • Additional menu options can be added to the global nav

These options can be configured by a JSON configuration file. The --query.ui-config command line parameter of the query service must then be set to the path to the JSON file when the query service is started.

An example configuration file:

{
  "dependencies": {
    "dagMaxNumServices": 200,
    "menuEnabled": true
  },
  "archiveEnabled": true,
  "tracking": {
    "gaID": "UA-000000-2",
    "trackErrors": true
  },
  "menu": [
    {
      "label": "About Jaeger",
      "items": [
        {
          "label": "GitHub",
          "url": "https://github.com/jaegertracing/jaeger"
        },
        {
          "label": "Docs",
          "url": "http://jaeger.readthedocs.io/en/latest/"
        }
      ]
    }
  ]
}

dependencies.dagMaxNumServices defines the maximum number of services allowed before the DAG dependency view is disabled. Default: 200.

dependencies.menuEnabled enables (true) or disables (false) the dependencies menu button. Default: true.

archiveEnabled enables (true) or disables (false) the archive traces button. Default: false. It requires a configuration of an archive storage in Query service. Archived traces are only accessible directly by ID, they are not searchable.

tracking.gaID defines the Google Analytics tracking ID. This is required for Google Analytics tracking, and setting it to a non-null value enables Google Analytics tracking. Default: null.

tracking.trackErrors enables (true) or disables (false) error tracking via Google Analytics. Errors can only be tracked if a valid Google Analytics ID is provided. For additional details on error tracking via Google Analytics see the tracking READMEexternal link in the UI repo. Default: true.

menu allows additional links to be added to the global nav. The additional links are right-aligned.

In the sample JSON config above, the configured menu will have a dropdown labeled “About Jaeger” with sub-options for “GitHub” and “Docs”. The format for a link in the top right menu is as follows:

{
  "label": "Some text here",
  "url": "https://example.com"
}

Links can either be members of the menu Array, directly, or they can be grouped into a dropdown menu option. The format for a group of links is:

{
  "label": "Dropdown button",
  "items": [ ]
}

The items Array should contain one or more link configurations.

TODO: Swagger and GraphQL API (issue 158external link).

Aggregation Jobs for Service Dependencies

Production deployments need an external process which aggregates data and creates dependency links between services. Project spark-dependenciesexternal link is a Spark job which derives dependency links and stores them directly to the storage.

Configuration

All binaries accepts command line properties and environmental variables which are managed by by viperexternal link and cobraexternal link. The names of environmental properties are capital letters and characters - and . are replaced with _. To list all configuration properties call jaeger-binary -h.