From 95927431c67cc4749f6ef4b9efbc022be3486ea5 Mon Sep 17 00:00:00 2001 From: "Ciro S. Costa" Date: Mon, 20 Jan 2020 08:00:21 -0500 Subject: [PATCH] contributing: add jaeger override to support tracing feature as a trace collector needs to be set up for one to consume the distr tracing functionality, here I add a docker-compose override[1] that's supposed to be merged together with our base `docker-compose.yml` to add `jaeger` and tie `web` with it, so that one can visualize the traces in the Jaeger UI. [1]: https://docs.docker.com/compose/extends/ Signed-off-by: Ciro S. Costa --- CONTRIBUTING.md | 19 +++++++++++++++++++ hack/overrides/jaeger.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 hack/overrides/jaeger.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91082d416..df02acdbc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -211,6 +211,25 @@ After this is done, the final step is to connect your IDE to the debugger with t For GoLand you can do so by going to Run | Edit Configurations… | + | Go Remote and fill in the parameters. +### Trying out distributed tracing with Jaeger + +Under `./hack`, a docker-compose override file named `jaeger.yml` provides the +essentials to get [Jaeger] running alongside the other components, as well tying +Concourse to it through the right environment variables. + +[Jaeger]: https://jaegertracing.io + +To leverage that extension, run `docker-compose up` specifying where all the +yaml files are: + +```sh +$ docker-compose \ + -f ./docker-compose.yml \ + -f ./hack/overrides/jaeger.yml \ + up -d +``` + + ### Connecting to Postgres If you want to poke around the database, you can connect to the `db` node using diff --git a/hack/overrides/jaeger.yml b/hack/overrides/jaeger.yml new file mode 100644 index 000000000..fb57142e8 --- /dev/null +++ b/hack/overrides/jaeger.yml @@ -0,0 +1,30 @@ +# jaeger.yml - a docker-compose override that adds 'jaeger to the stack. +# +# once running, head to `localhost:25000` to get access to the Jaeger UI. +# +# ref: https://www.jaegertracing.io/ +# ref: https://docs.docker.com/compose/extends/ +# +version: '3' + +services: + web: + environment: + CONCOURSE_TRACING_JAEGER_COMPONENT: atc + CONCOURSE_TRACING_JAEGER_ENDPOINT: http://jaeger:14268/api/traces + + jaeger: + image: jaegertracing/all-in-one:1.14 + command: + - --sampling.strategies-file=/etc/jaeger/sampling_strategies.json + - --log-level=debug + environment: + COLLECTOR_ZIPKIN_HTTP_PORT: 9411 + ports: + - '14268:14268' + - '25000:16686' + - '5775:5775/udp' + - '5778:5778' + - '6831:6831/udp' + - '6832:6832/udp' + - '9411:9411'