Skip to content
Example application to help demonstrate the Linkerd service mesh
Go CSS JavaScript Makefile Dockerfile
Branch: master
Clone or download
Pull request Compare This branch is 12 commits ahead, 12 commits behind BuoyantIO:master.
adleong Update deployment version
Signed-off-by: Alex Leong <alex@buoyant.io>
Latest commit 0d7e951 Nov 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Do not require DCO signoff for project members Feb 1, 2018
assets Prep emojivoto for move to buoyantio/emojivoto repo (BuoyantIO#54) Jul 27, 2018
emojivoto-emoji-svc Start traces in vote-bot Aug 27, 2019
emojivoto-voting-svc Start traces in vote-bot Aug 27, 2019
emojivoto-web reference architecture Sep 23, 2019
integration_test Prep emojivoto for move to buoyantio/emojivoto repo (BuoyantIO#54) Jul 27, 2018
proto Prep emojivoto for move to buoyantio/emojivoto repo (BuoyantIO#54) Jul 27, 2018
.gitignore Prep emojivoto for move to buoyantio/emojivoto repo (BuoyantIO#54) Jul 27, 2018
Dockerfile update image version from v7 to v8 Apr 9, 2019
Dockerfile-base Prep emojivoto for move to buoyantio/emojivoto repo (BuoyantIO#54) Jul 27, 2018
Gopkg.lock Fix Sep 4, 2019
Gopkg.toml Instrument with ocagent Aug 14, 2019
Makefile Prep emojivoto for move to buoyantio/emojivoto repo (BuoyantIO#54) Jul 27, 2018
README.md reference architecture Sep 23, 2019
common.mk update image version from v7 to v8 Apr 9, 2019
docker-compose.yml update image version from v7 to v8 Apr 9, 2019
emojivoto-daemonset.yml update image version from v7 to v8 Apr 9, 2019
emojivoto-job.yml update image version from v7 to v8 Apr 9, 2019
emojivoto-statefulset.yml Fix serviceName fields for stateful set config (BuoyantIO#68) Jul 22, 2019
emojivoto.yml Update deployment version Nov 16, 2019
ingress.yml Update deployment version Nov 16, 2019
tracing.yml Update deployment version Nov 16, 2019

README.md

Distributed Tracing with Emoji.voto

This is a fork of the Emoji.voto project with distributed tracing instrumentation built in. This is intended to serve as a reference architecture for how to add distributed tracing to an application.

For more information about Emoji.voto and for instructions on how to build and run the project, see the upstream README.

To see the changes that were necessary to instrument Emoji.voto, see the diff.

Quick Start

kubectl apply -f tracing.yml
kubectl apply -f emojivoto.yml
kubectl apply -f ingress.yml
kubectl -n tracing port-forward deploy/jaeger 16686 &
open http://localhost:16686

Architecture

We use the OpenCensus Service collector to collect traces and Jaeger to store and display them. Each Emoji.voto service is instrumented with the OpenCensus Go client to emit trace data to the collector. Nginx acts as an ingress and makes all sampling decisions about when to initiate a trace (in this example we use a 50% sample rate.) HTTP communication uses the Zipkin trace propagation headers and gRPC communication uses the gRPC trace metadata.

Nginx

Nginx is deployed as an ingress controller. For each request it receives, it has a 50% change of sampling that trace. For any traces that it samples, it sends span data to the OpenCensus collector using the Zipkin reporting protocol and sets the X-b3-* headers on the request to mark that downstream services should sample it as well in order to produce a full trace.

Emoji.voto

All Emoji.voto services use the OpenCensus Go client to propagate trace context from the incoming requests to the outgoing requests. They also honor the sampling decision made by the ingress. If a trace should be sampled, they report span data to the OpenCensus collector using the OpenCensus agent protocol.

OpenCensus Collector

The collector is an aggregation and translation layer which receives span data from Nginx and the Emoji.voto services and forwards that data to Jaeger.

Jaeger

Jaeger receives traces from the OpenCensus collector, stores them, and displays them in a web UI.

You can’t perform that action at this time.