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 <cscosta@pivotal.io>
This commit is contained in:
Ciro S. Costa 2020-01-20 08:00:21 -05:00
parent 568cba392c
commit 95927431c6
2 changed files with 49 additions and 0 deletions

View File

@ -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

30
hack/overrides/jaeger.yml Normal file
View File

@ -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'