diff options
author | Erik Johnston <erik@matrix.org> | 2020-10-26 09:30:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 09:30:19 +0000 |
commit | 2b7c180879e5d62145feed88375ba55f18fc2ae5 (patch) | |
tree | 6891abafc487b675d6e2fe0f5d602dad2d46d1aa /synapse/replication/tcp | |
parent | Fix typos and spelling errors. (#8639) (diff) | |
download | synapse-2b7c180879e5d62145feed88375ba55f18fc2ae5.tar.xz |
Start fewer opentracing spans (#8640)
#8567 started a span for every background process. This is good as it means all Synapse code that gets run should be in a span (unless in the sentinel logging context), but it means we generate about 15x the number of spans as we did previously. This PR attempts to reduce that number by a) not starting one for send commands to Redis, and b) deferring starting background processes until after we're sure they're necessary. I don't really know how much this will help.
Diffstat (limited to 'synapse/replication/tcp')
-rw-r--r-- | synapse/replication/tcp/redis.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/replication/tcp/redis.py b/synapse/replication/tcp/redis.py index de19705c1f..bc6ba709a7 100644 --- a/synapse/replication/tcp/redis.py +++ b/synapse/replication/tcp/redis.py @@ -166,7 +166,9 @@ class RedisSubscriber(txredisapi.SubscriberProtocol, AbstractConnection): Args: cmd (Command) """ - run_as_background_process("send-cmd", self._async_send_command, cmd) + run_as_background_process( + "send-cmd", self._async_send_command, cmd, bg_start_span=False + ) async def _async_send_command(self, cmd: Command): """Encode a replication command and send it over our outbound connection""" |