This commit is contained in:
reivilibre 2022-10-26 11:48:33 +00:00
parent 8f32d5a2f2
commit e4d3792708
10 changed files with 138 additions and 42 deletions

View File

@ -362,7 +362,7 @@ Here is how to run your local Synapse checkout against your local Complement che
</code></pre>
<h3 id="prettier-formatting-with-gotestfmt"><a class="header" href="#prettier-formatting-with-gotestfmt">Prettier formatting with <code>gotestfmt</code></a></h3>
<p>If you want to format the output of the tests the same way as it looks in CI,
install <a href="https://github.com/haveyoudebuggedit/gotestfmt">gotestfmt</a>.</p>
install <a href="https://github.com/GoTestTools/gotestfmt">gotestfmt</a>.</p>
<p>You can then use this incantation to format the tests appropriately:</p>
<pre><code class="language-sh">COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh -json | gotestfmt -hide successful-tests
</code></pre>
@ -405,7 +405,7 @@ in the format of <code>PRnumber.type</code>. The type can be one of the followin
<p>This file will become part of our <a href="https://github.com/matrix-org/synapse/blob/master/CHANGES.md">changelog</a> at the next
release, so the content of the file should be a short description of your
change in the same style as the rest of the changelog. The file can contain Markdown
formatting, and should end with a full stop (.) or an exclamation mark (!) for
formatting, and must end with a full stop (.) or an exclamation mark (!) for
consistency.</p>
<p>Adding credits to the changelog is encouraged, we value your
contributions and would like to have you shouted out in the release notes!</p>

View File

@ -163,12 +163,19 @@ set to <code>True</code>.</p>
collect data:</p>
<p>There are two methods of enabling the metrics endpoint in Synapse.</p>
<p>The first serves the metrics as a part of the usual web server and
can be enabled by adding the &quot;metrics&quot; resource to the existing
listener as such:</p>
<pre><code class="language-yaml"> resources:
- names:
- client
- metrics
can be enabled by adding the <code>metrics</code> resource to the existing
listener as such as in this example:</p>
<pre><code class="language-yaml">listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
bind_addresses: ['::1', '127.0.0.1']
resources:
# added &quot;metrics&quot; in this line
- names: [client, federation, metrics]
compress: false
</code></pre>
<p>This provides a simple way of adding metrics to your Synapse
installation, and serves under <code>/_synapse/metrics</code>. If you do not
@ -179,12 +186,22 @@ different thread to Synapse. This can make it more resilient to
heavy load meaning metrics cannot be retrieved, and can be exposed
to just internal networks easier. The served metrics are available
over HTTP only, and will be available at <code>/_synapse/metrics</code>.</p>
<p>Add a new listener to homeserver.yaml:</p>
<pre><code class="language-yaml"> listeners:
- type: metrics
port: 9000
bind_addresses:
- '0.0.0.0'
<p>Add a new listener to homeserver.yaml as in this example:</p>
<pre><code class="language-yaml">listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
bind_addresses: ['::1', '127.0.0.1']
resources:
- names: [client, federation]
compress: false
# beginning of the new metrics listener
- port: 9000
type: metrics
bind_addresses: ['::1', '127.0.0.1']
</code></pre>
</li>
<li>

View File

@ -448,11 +448,12 @@ does not return a <code>sub</code> property, an alternative <code>subject_claim<
issuer: &quot;https://accounts.google.com/&quot;
client_id: &quot;your-client-id&quot; # TO BE FILLED
client_secret: &quot;your-client-secret&quot; # TO BE FILLED
scopes: [&quot;openid&quot;, &quot;profile&quot;]
scopes: [&quot;openid&quot;, &quot;profile&quot;, &quot;email&quot;] # email is optional, read below
user_mapping_provider:
config:
localpart_template: &quot;{{ user.given_name|lower }}&quot;
display_name_template: &quot;{{ user.name }}&quot;
email_template: &quot;{{ user.email }}&quot; # needs &quot;email&quot; in scopes above
</code></pre>
</li>
<li>Back in the Google console, add this Authorized redirect URI: <code>[synapse public baseurl]/_synapse/client/oidc/callback</code>.</li>
@ -530,7 +531,7 @@ and &quot;App Secret&quot; for use below.</li>
user_mapping_provider:
config:
display_name_template: &quot;{{ user.name }}&quot;
email_template: &quot;{{ '{{ user.email }}' }}&quot;
email_template: &quot;{{ user.email }}&quot;
</code></pre>
<p>Relevant documents:</p>
<ul>

View File

@ -4206,7 +4206,7 @@ Defaults to 2m.</p>
<li>
<p><code>cache_autotuning</code> and its sub-options <code>max_cache_memory_usage</code>, <code>target_cache_memory_usage</code>, and
<code>min_cache_ttl</code> work in conjunction with each other to maintain a balance between cache memory
usage and cache entry availability. You must be using <a href="https://github.com/matrix-org/synapse#help-synapse-is-slow-and-eats-all-my-ramcpu">jemalloc</a>
usage and cache entry availability. You must be using <a href="usage/configuration/../administration/admin_faq.html#help-synapse-is-slow-and-eats-all-my-ramcpu">jemalloc</a>
to utilize this option, and all three of the options must be specified for this feature to work. This option
defaults to off, enable it by providing values for the sub-options listed below. Please note that the feature will not work
and may cause unstable behavior (such as excessive emptying of caches or exceptions) if all of the values are not provided.
@ -4999,7 +4999,7 @@ shared secret, even if <a href="usage/configuration/config_documentation.html#en
set.</p>
<p>This is primarily intended for use with the <code>register_new_matrix_user</code> script
(see <a href="usage/configuration/../../setup/installation.html#registering-a-user">Registering a user</a>);
however, the interface is <a href="usage/configuration/../admin_api/register_api.html">documented</a>.</p>
however, the interface is <a href="usage/configuration/../../admin_api/register_api.html">documented</a>.</p>
<p>See also <a href="usage/configuration/config_documentation.html#registration_shared_secret_path"><code>registration_shared_secret_path</code></a>.</p>
<p>Example configuration:</p>
<pre><code class="language-yaml">registration_shared_secret: &lt;PRIVATE STRING&gt;
@ -6312,8 +6312,8 @@ users by always returning an empty list for all queries. Defaults to true.</p>
<pre><code class="language-yaml">enable_room_list_search: false
</code></pre>
<hr />
<h3 id="alias_creation"><a class="header" href="#alias_creation"><code>alias_creation</code></a></h3>
<p>The <code>alias_creation</code> option controls who is allowed to create aliases
<h3 id="alias_creation_rules"><a class="header" href="#alias_creation_rules"><code>alias_creation_rules</code></a></h3>
<p>The <code>alias_creation_rules</code> option controls who is allowed to create aliases
on this server.</p>
<p>The format of this option is a list of rules that contain globs that
match against user_id, room_id and the new alias (fully qualified with
@ -7331,11 +7331,12 @@ does not return a <code>sub</code> property, an alternative <code>subject_claim<
issuer: &quot;https://accounts.google.com/&quot;
client_id: &quot;your-client-id&quot; # TO BE FILLED
client_secret: &quot;your-client-secret&quot; # TO BE FILLED
scopes: [&quot;openid&quot;, &quot;profile&quot;]
scopes: [&quot;openid&quot;, &quot;profile&quot;, &quot;email&quot;] # email is optional, read below
user_mapping_provider:
config:
localpart_template: &quot;{{ user.given_name|lower }}&quot;
display_name_template: &quot;{{ user.name }}&quot;
email_template: &quot;{{ user.email }}&quot; # needs &quot;email&quot; in scopes above
</code></pre>
</li>
<li>Back in the Google console, add this Authorized redirect URI: <code>[synapse public baseurl]/_synapse/client/oidc/callback</code>.</li>
@ -7413,7 +7414,7 @@ and &quot;App Secret&quot; for use below.</li>
user_mapping_provider:
config:
display_name_template: &quot;{{ user.name }}&quot;
email_template: &quot;{{ '{{ user.email }}' }}&quot;
email_template: &quot;{{ user.email }}&quot;
</code></pre>
<p>Relevant documents:</p>
<ul>
@ -9981,6 +9982,8 @@ information.</p>
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
^/_matrix/client/v1/rooms/.*/hierarchy$
^/_matrix/client/(v1|unstable)/rooms/.*/relations/
^/_matrix/client/v1/rooms/.*/threads$
^/_matrix/client/unstable/org.matrix.msc2716/rooms/.*/batch_send$
^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
^/_matrix/client/(r0|v3|unstable)/account/3pid$
@ -10228,6 +10231,16 @@ pusher instances by their worker name, e.g.:</p>
- pusher_worker1
- pusher_worker2
</code></pre>
<p>An example for a pusher instance:</p>
<pre><code class="language-yaml">worker_app: synapse.app.pusher
worker_name: pusher_worker1
# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093
worker_log_config: /etc/matrix-synapse/pusher-worker-log.yaml
</code></pre>
<h3 id="synapseappappservice"><a class="header" href="#synapseappappservice"><code>synapse.app.appservice</code></a></h3>
<p><strong>Deprecated as of Synapse v1.59.</strong> <a href="workers.html#notifying-application-services">Use <code>synapse.app.generic_worker</code> with the
<code>notify_appservices_from_worker</code> option instead.</a></p>
@ -10247,6 +10260,16 @@ For example:</p>
- federation_sender1
- federation_sender2
</code></pre>
<p>An example for a federation sender instance:</p>
<pre><code class="language-yaml">worker_app: synapse.app.federation_sender
worker_name: federation_sender1
# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093
worker_log_config: /etc/matrix-synapse/federation-sender-log.yaml
</code></pre>
<h3 id="synapseappmedia_repository"><a class="header" href="#synapseappmedia_repository"><code>synapse.app.media_repository</code></a></h3>
<p>Handles the media repository. It can handle all endpoints starting with:</p>
<pre><code>/_matrix/media/
@ -13709,12 +13732,19 @@ set to <code>True</code>.</p>
collect data:</p>
<p>There are two methods of enabling the metrics endpoint in Synapse.</p>
<p>The first serves the metrics as a part of the usual web server and
can be enabled by adding the &quot;metrics&quot; resource to the existing
listener as such:</p>
<pre><code class="language-yaml"> resources:
- names:
- client
- metrics
can be enabled by adding the <code>metrics</code> resource to the existing
listener as such as in this example:</p>
<pre><code class="language-yaml">listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
bind_addresses: ['::1', '127.0.0.1']
resources:
# added &quot;metrics&quot; in this line
- names: [client, federation, metrics]
compress: false
</code></pre>
<p>This provides a simple way of adding metrics to your Synapse
installation, and serves under <code>/_synapse/metrics</code>. If you do not
@ -13725,12 +13755,22 @@ different thread to Synapse. This can make it more resilient to
heavy load meaning metrics cannot be retrieved, and can be exposed
to just internal networks easier. The served metrics are available
over HTTP only, and will be available at <code>/_synapse/metrics</code>.</p>
<p>Add a new listener to homeserver.yaml:</p>
<pre><code class="language-yaml"> listeners:
- type: metrics
port: 9000
bind_addresses:
- '0.0.0.0'
<p>Add a new listener to homeserver.yaml as in this example:</p>
<pre><code class="language-yaml">listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
bind_addresses: ['::1', '127.0.0.1']
resources:
- names: [client, federation]
compress: false
# beginning of the new metrics listener
- port: 9000
type: metrics
bind_addresses: ['::1', '127.0.0.1']
</code></pre>
</li>
<li>
@ -14702,7 +14742,7 @@ Here is how to run your local Synapse checkout against your local Complement che
</code></pre>
<h3 id="prettier-formatting-with-gotestfmt"><a class="header" href="#prettier-formatting-with-gotestfmt">Prettier formatting with <code>gotestfmt</code></a></h3>
<p>If you want to format the output of the tests the same way as it looks in CI,
install <a href="https://github.com/haveyoudebuggedit/gotestfmt">gotestfmt</a>.</p>
install <a href="https://github.com/GoTestTools/gotestfmt">gotestfmt</a>.</p>
<p>You can then use this incantation to format the tests appropriately:</p>
<pre><code class="language-sh">COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh -json | gotestfmt -hide successful-tests
</code></pre>
@ -14745,7 +14785,7 @@ in the format of <code>PRnumber.type</code>. The type can be one of the followin
<p>This file will become part of our <a href="https://github.com/matrix-org/synapse/blob/master/CHANGES.md">changelog</a> at the next
release, so the content of the file should be a short description of your
change in the same style as the rest of the changelog. The file can contain Markdown
formatting, and should end with a full stop (.) or an exclamation mark (!) for
formatting, and must end with a full stop (.) or an exclamation mark (!) for
consistency.</p>
<p>Adding credits to the changelog is encouraged, we value your
contributions and would like to have you shouted out in the release notes!</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
worker_app: synapse.app.federation_sender
worker_name: federation_sender1
# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093
worker_log_config: /etc/matrix-synapse/federation-sender-log.yaml

View File

@ -0,0 +1,8 @@
worker_app: synapse.app.pusher
worker_name: pusher_worker1
# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093
worker_log_config: /etc/matrix-synapse/pusher-worker-log.yaml

View File

@ -1074,7 +1074,7 @@ Defaults to 2m.</p>
<li>
<p><code>cache_autotuning</code> and its sub-options <code>max_cache_memory_usage</code>, <code>target_cache_memory_usage</code>, and
<code>min_cache_ttl</code> work in conjunction with each other to maintain a balance between cache memory
usage and cache entry availability. You must be using <a href="https://github.com/matrix-org/synapse#help-synapse-is-slow-and-eats-all-my-ramcpu">jemalloc</a>
usage and cache entry availability. You must be using <a href="../administration/admin_faq.html#help-synapse-is-slow-and-eats-all-my-ramcpu">jemalloc</a>
to utilize this option, and all three of the options must be specified for this feature to work. This option
defaults to off, enable it by providing values for the sub-options listed below. Please note that the feature will not work
and may cause unstable behavior (such as excessive emptying of caches or exceptions) if all of the values are not provided.
@ -1867,7 +1867,7 @@ shared secret, even if <a href="#enable_registration"><code>enable_registration<
set.</p>
<p>This is primarily intended for use with the <code>register_new_matrix_user</code> script
(see <a href="../../setup/installation.html#registering-a-user">Registering a user</a>);
however, the interface is <a href="../admin_api/register_api.html">documented</a>.</p>
however, the interface is <a href="../../admin_api/register_api.html">documented</a>.</p>
<p>See also <a href="#registration_shared_secret_path"><code>registration_shared_secret_path</code></a>.</p>
<p>Example configuration:</p>
<pre><code class="language-yaml">registration_shared_secret: &lt;PRIVATE STRING&gt;
@ -3180,8 +3180,8 @@ users by always returning an empty list for all queries. Defaults to true.</p>
<pre><code class="language-yaml">enable_room_list_search: false
</code></pre>
<hr />
<h3 id="alias_creation"><a class="header" href="#alias_creation"><code>alias_creation</code></a></h3>
<p>The <code>alias_creation</code> option controls who is allowed to create aliases
<h3 id="alias_creation_rules"><a class="header" href="#alias_creation_rules"><code>alias_creation_rules</code></a></h3>
<p>The <code>alias_creation_rules</code> option controls who is allowed to create aliases
on this server.</p>
<p>The format of this option is a list of rules that contain globs that
match against user_id, room_id and the new alias (fully qualified with

View File

@ -323,6 +323,8 @@ information.</p>
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
^/_matrix/client/v1/rooms/.*/hierarchy$
^/_matrix/client/(v1|unstable)/rooms/.*/relations/
^/_matrix/client/v1/rooms/.*/threads$
^/_matrix/client/unstable/org.matrix.msc2716/rooms/.*/batch_send$
^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
^/_matrix/client/(r0|v3|unstable)/account/3pid$
@ -570,6 +572,16 @@ pusher instances by their worker name, e.g.:</p>
- pusher_worker1
- pusher_worker2
</code></pre>
<p>An example for a pusher instance:</p>
<pre><code class="language-yaml">worker_app: synapse.app.pusher
worker_name: pusher_worker1
# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093
worker_log_config: /etc/matrix-synapse/pusher-worker-log.yaml
</code></pre>
<h3 id="synapseappappservice"><a class="header" href="#synapseappappservice"><code>synapse.app.appservice</code></a></h3>
<p><strong>Deprecated as of Synapse v1.59.</strong> <a href="#notifying-application-services">Use <code>synapse.app.generic_worker</code> with the
<code>notify_appservices_from_worker</code> option instead.</a></p>
@ -589,6 +601,16 @@ For example:</p>
- federation_sender1
- federation_sender2
</code></pre>
<p>An example for a federation sender instance:</p>
<pre><code class="language-yaml">worker_app: synapse.app.federation_sender
worker_name: federation_sender1
# The replication listener on the main synapse process.
worker_replication_host: 127.0.0.1
worker_replication_http_port: 9093
worker_log_config: /etc/matrix-synapse/federation-sender-log.yaml
</code></pre>
<h3 id="synapseappmedia_repository"><a class="header" href="#synapseappmedia_repository"><code>synapse.app.media_repository</code></a></h3>
<p>Handles the media repository. It can handle all endpoints starting with:</p>
<pre><code>/_matrix/media/