Skip to content

Simple Kubernetes tracing example and experiment

Notifications You must be signed in to change notification settings

slok/tracing-example

Repository files navigation

tracing-example

A tracing example to show how it works Kubernetes and Opentracing

This example shows how the tracing acts in different endpoints and can be traced on each of the services using proxies.

multiple-trace

Componentes

tracing-example app

Is a simple Go app made to create long and with huge call to other services that will be generated randomly.

Disclaimer: Is an example app to test tracing (no tests, not the best structure, developed very fast...)

The app has different endpoints:

  • /operation/fast-end: Very fast rsponding endpoint.
  • /operation/slow-end: Slow responding endpoint.
  • /operation/single-call: Makes a call to another random service in a random endpoint before returning.
  • /operation/multiple-calls: Makes multiple (random number) of calls to another random services in a random endpoints before returning.

With these different endpoints and multiple apps of this app running and connected we can create very long traces to check how everything is propagated and how the requests enter on the services through the sidecar proxies (skipper).

Run on localhost

This will run 3 services (service-a, service-b, service-c) and infront of each service a sidecar proxy (trying to imitate Kubernetes on localhost for development) and the a jaeger stack in one single container (using memory as the store).

The example can be run on localhost using docker compose:

make dev

After this you can make a simple request to any of the different service endpoints:

And check the traces on Jaeger interface: http://localhost:16686

You can also have fun using vegeta :)

echo -e "GET http://localhost:9090/operation/single-call\nGET http://localhost:9091/operation/single-call\nGET http://localhost:9092/operation/single-call" | vegeta attack -duration=30s | tee results.bin | vegeta report

Run on Kubernetes

There is a deployment chart with all the example on chart directory(the deployed Jaeger is in development mode, not a production ready one).

About

Simple Kubernetes tracing example and experiment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published