aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-08-27 10:24:56 +0100
committerGitHub <noreply@github.com>2020-08-27 10:24:56 +0100
commit421b6b2313594a1810f414c21b43706b2eaaba2b (patch)
tree43207430641a51c843928a21da92897ef416f1e7 /docs
parent42183bef508be3495ac429abf29b795f9c8d2a6e (diff)
Add OpenTracing documentation (#1345)
* Add OpenTracing documentation Closes #274 * Reshuffle * Update setup.md
Diffstat (limited to 'docs')
-rw-r--r--docs/tracing/jaeger.pngbin0 -> 264127 bytes
-rw-r--r--docs/tracing/opentracing.md (renamed from docs/opentracing.md)0
-rw-r--r--docs/tracing/setup.md49
3 files changed, 49 insertions, 0 deletions
diff --git a/docs/tracing/jaeger.png b/docs/tracing/jaeger.png
new file mode 100644
index 00000000..8b1e61fe
--- /dev/null
+++ b/docs/tracing/jaeger.png
Binary files differ
diff --git a/docs/opentracing.md b/docs/tracing/opentracing.md
index a2110bc0..a2110bc0 100644
--- a/docs/opentracing.md
+++ b/docs/tracing/opentracing.md
diff --git a/docs/tracing/setup.md b/docs/tracing/setup.md
new file mode 100644
index 00000000..2cab4d1e
--- /dev/null
+++ b/docs/tracing/setup.md
@@ -0,0 +1,49 @@
+## OpenTracing Setup
+
+![Trace when sending an event into a room](/docs/tracing/jaeger.png)
+
+Dendrite uses [Jaeger](https://www.jaegertracing.io/) for tracing between microservices.
+Tracing shows the nesting of logical spans which provides visibility on how the microservices interact.
+This document explains how to set up Jaeger locally on a single machine.
+
+### Set up the Jaeger backend
+
+The [easiest way](https://www.jaegertracing.io/docs/1.18/getting-started/) is to use the all-in-one Docker image:
+```
+$ 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 14250:14250 \
+ -p 9411:9411 \
+ jaegertracing/all-in-one:1.18
+```
+
+### Configuring Dendrite to talk to Jaeger
+
+Modify your config to look like: (this will send every single span to Jaeger which will be slow on large instances, but for local testing it's fine)
+```
+tracing:
+ enabled: true
+ jaeger:
+ serviceName: "dendrite"
+ disabled: false
+ rpc_metrics: true
+ tags: []
+ sampler:
+ type: const
+ param: 1
+```
+
+then run the monolith server with `--api true` to use polylith components which do tracing spans:
+```
+$ ./dendrite-monolith-server --tls-cert server.crt --tls-key server.key --config dendrite.yaml --api true
+```
+
+### Checking traces
+
+Visit http://localhost:16686 to see traces under `DendriteMonolith`.