Skip to content

Latest commit

 

History

History
146 lines (109 loc) · 4.78 KB

getting-started.md

File metadata and controls

146 lines (109 loc) · 4.78 KB
title description weight
Getting started
Get up and running with Jaeger in your local environment
2

Instrumentation

Your applications must be instrumented before they can send tracing data to Jaeger backend. Check the Client Libraries section for information about how to use the OpenTracing API and how to initialize and configure Jaeger tracers.

All in One

All-in-one is an executable designed for quick local testing, launches the Jaeger UI, collector, query, and agent, with an in memory storage component.

The simplest way to start the all-in-one is to use the pre-built image published to DockerHub (a single command line).

$ docker run -d --name jaeger \
  -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
  -p 5775:5775/udp \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 5778:5778 \
  -p 16686:16686 \
  -p 14268:14268 \
  -p 9411:9411 \
  jaegertracing/all-in-one:{{< currentVersion >}}

Or run the jaeger-all-in-one(.exe) executable from the binary distribution archives:

$ jaeger-all-in-one --collector.zipkin.http-port=9411

You can then navigate to http://localhost:16686 to access the Jaeger UI.

The container exposes the following ports:

Port Protocol Component Function
5775 UDP agent accept zipkin.thrift over compact thrift protocol (deprecated, used by legacy clients only)
6831 UDP agent accept jaeger.thrift over compact thrift protocol
6832 UDP agent accept jaeger.thrift over binary thrift protocol
5778 HTTP agent serve configs
16686 HTTP query serve frontend
14268 HTTP collector accept jaeger.thrift directly from clients
9411 HTTP collector Zipkin compatible endpoint (optional)

Kubernetes and OpenShift

Sample Application

HotROD (Rides on Demand)

This is a demo application that consists of several microservices and illustrates the use of the OpenTracing API. A tutorial / walkthrough is available in the blog post: Take OpenTracing for a HotROD ride.

It can be run standalone, but requires Jaeger backend to view the {{< tip "traces" "trace" >}}.

Running

From Source
mkdir -p $GOPATH/src/github.com/jaegertracing
cd $GOPATH/src/github.com/jaegertracing
git clone [email protected]:jaegertracing/jaeger.git jaeger
cd jaeger
make install
go run ./examples/hotrod/main.go all
From docker
$ docker run --rm -it \
  --link jaeger \
  -p8080-8083:8080-8083 \
  -e JAEGER_AGENT_HOST="jaeger" \
  jaegertracing/example-hotrod:{{< currentVersion >}} \
  all
From binary distribution

Run example-hotrod(.exe) executable from the binary distribution archives:

$ example-hotrod all

Then navigate to http://localhost:8080.

Features

  • Discover architecture of the whole system via data-driven dependency diagram.

  • View request timeline and errors; understand how the app works.

  • Find sources of latency and lack of concurrency.

  • Highly contextualized logging.

  • Use baggage propagation to:

    • Diagnose inter-request contention (queueing).
    • Attribute time spent in a service.
  • Use open source libraries with OpenTracing integration to get vendor-neutral instrumentation for free.

Prerequisites

  • You need Go 1.11 or higher installed on your machine to run from source.
  • Requires a running Jaeger backend to view the traces.

Client Libraries

Look here.

Running Individual Jaeger Components

Individual Jaeger backend components can be run from source. They all have their main.go in the cmd folder. For example, to run the jaeger-agent:

mkdir -p $GOPATH/src/github.com/jaegertracing
cd $GOPATH/src/github.com/jaegertracing
git clone [email protected]:jaegertracing/jaeger.git jaeger
cd jaeger
make install
go run ./cmd/agent/main.go

Migrating from Zipkin

Collector service exposes Zipkin compatible REST API /api/v1/spans and /api/v2/spans for both JSON and thrift encoding. By default it's disabled. It can be enabled with --collector.zipkin.http-port=9411.

Zipkin Thrift IDL file can be found in jaegertracing/jaeger-idl. It's compatible with openzipkin/zipkin-api