Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 15ff12e

Browse files
Apply suggestions from code review
Mostly just rewording parts of the docs for clarity. Co-Authored-By: Richard van der Hoff <[email protected]>
1 parent 65d22aa commit 15ff12e

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

docs/opentracing.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Our current selected implementation is Jaeger.
1313

1414
OpenTracing is a tool which gives an insight into the causal relationship of
1515
work done in and between servers. The servers each track events and report them
16-
to a centralised server - in our Synapse's case: Jaeger. The basic unit used to
16+
to a centralised server - in Synapse's case: Jaeger. The basic unit used to
1717
represent events is the span. The span roughly represents a single piece of work
1818
that was done and the time at which it occurred. A span can have child spans,
1919
meaning that the work of the child had to be completed for the parent span to
@@ -59,12 +59,12 @@ Latest documentation is probably at
5959
https://www.jaegertracing.io/docs/1.13/getting-started/
6060

6161

62-
Enable opentracing in Synapse
62+
Enable OpenTracing in Synapse
6363
-----------------------------
6464

65-
Opentracing is not enabled by default. It must be enabled in the homeserver
65+
OpenTracing is not enabled by default. It must be enabled in the homeserver
6666
config by uncommenting the config options under ``opentracing`` as shown in
67-
the [sample config](./sample_config.yaml). For example:
67+
the `sample config <./sample_config.yaml>`_. For example:
6868

6969
.. code-block:: yaml
7070
@@ -77,7 +77,7 @@ the [sample config](./sample_config.yaml). For example:
7777
Homeserver whitelisting
7878
-----------------------
7979

80-
The homeserver whitelist is configured using regular expression. A list of regular
80+
The homeserver whitelist is configured using regular expressions. A list of regular
8181
expressions can be given and their union will be compared when propagating any
8282
spans contexts to another homeserver.
8383

@@ -86,9 +86,9 @@ untrusted users since span contexts are usually opaque ids it can lead to
8686
two problems, namely:
8787

8888
- If the span context is marked as sampled by the sending homeserver the receiver will
89-
sample it. Therefore two homeservers with wildly disparaging sampling policies
89+
sample it. Therefore two homeservers with wildly different sampling policies
9090
could incur higher sampling counts than intended.
91-
- Span baggage can be arbitrary data. For safety this has been disabled in Synapse
91+
- Sending servers can attach arbitrary data to spans, known as 'baggage'. For safety this has been disabled in Synapse
9292
but that doesn't prevent another server sending you baggage which will be logged
9393
to OpenTracing's logs.
9494

docs/sample_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,8 +1422,8 @@ opentracing:
14221422
#enabled: true
14231423

14241424
# The list of homeservers we wish to send and receive span contexts and span baggage.
1425-
#
1426-
# This a list of regexes which are matched against the server_name of the
1425+
# See docs/opentracing.rst
1426+
# This is a list of regexes which are matched against the server_name of the
14271427
# homeserver.
14281428
#
14291429
# By defult, it is empty, so no servers are matched.

synapse/config/tracer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def generate_config_section(cls, **kwargs):
4848
#enabled: true
4949
5050
# The list of homeservers we wish to send and receive span contexts and span baggage.
51-
#
52-
# This a list of regexes which are matched against the server_name of the
51+
# See docs/opentracing.rst
52+
# This is a list of regexes which are matched against the server_name of the
5353
# homeserver.
5454
#
5555
# By defult, it is empty, so no servers are matched.

synapse/logging/opentracing.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@
3030
============================
3131
3232
Python-specific tracing concepts are at https://opentracing.io/guides/python/.
33-
Note that Synapse wraps OpenTracing in a small module in order to make the
33+
Note that Synapse wraps OpenTracing in a small module (this one) in order to make the
3434
OpenTracing dependency optional. That means that the access patterns are
3535
different to those demonstrated in the OpenTracing guides. However, it is
3636
still useful to know, especially if OpenTracing is included as a full dependency
37-
in the future or if you are modifying Synapse's `opentracing` module.
37+
in the future or if you are modifying this module.
3838
3939
40-
Access to the OpenTracing API is mediated through the
41-
``logging/opentracing.py`` module. OpenTracing is encapsulated so that
42-
no span objects from OpenTracing are exposed in Synapses code. This allows
40+
OpenTracing is encapsulated so that
41+
no span objects from OpenTracing are exposed in Synapse's code. This allows
4342
OpenTracing to be easily disabled in Synapse and thereby have OpenTracing as
4443
an optional dependency. This does however limit the number of modifiable spans
4544
at any point in the code to one. From here out references to `opentracing`

0 commit comments

Comments
 (0)