synapse/tests/replication
Eric Eastwood fc10a5ee29
Refactor Measure block metrics to be homeserver-scoped (v2) (#18601)
Refactor `Measure` block metrics to be homeserver-scoped (add
`server_name` label to block metrics).

Part of https://github.com/element-hq/synapse/issues/18592


### Testing strategy

#### See behavior of previous `metrics` listener

 1. Add the `metrics` listener in your `homeserver.yaml`
    ```yaml
    listeners:
      - port: 9323
        type: metrics
        bind_addresses: ['127.0.0.1']
    ```
1. Start the homeserver: `poetry run synapse_homeserver --config-path
homeserver.yaml`
 1. Fetch `http://localhost:9323/metrics`
1. Observe response includes the block metrics
(`synapse_util_metrics_block_count`,
`synapse_util_metrics_block_in_flight`, etc)


#### See behavior of the `http` `metrics` resource

1. Add the `metrics` resource to a new or existing `http` listeners in
your `homeserver.yaml`
    ```yaml
    listeners:
      - port: 9322
        type: http
        bind_addresses: ['127.0.0.1']
        resources:
          - names: [metrics]
            compress: false
    ```
1. Start the homeserver: `poetry run synapse_homeserver --config-path
homeserver.yaml`
1. Fetch `http://localhost:9322/_synapse/metrics` (it's just a `GET`
request so you can even do in the browser)
1. Observe response includes the block metrics
(`synapse_util_metrics_block_count`,
`synapse_util_metrics_block_in_flight`, etc)
2025-07-15 15:55:23 -05:00
..
http Bump mypy from 1.11.2 to 1.12.1 and fix new typechecking errors (#17999) 2024-12-18 11:42:17 +00:00
storage Fix bug in sliding sync when using old DB. (#17398) 2024-07-08 20:30:23 +01:00
tcp Bump ruff from 0.7.3 to 0.11.10 (#18451) 2025-05-20 15:23:30 +01:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_base.py Unbreak unit tests with Twisted 25.5.0 by add parsePOSTFormSubmission arg to FakeSite (#18577) 2025-06-24 11:52:06 +01:00
test_auth.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_client_reader_shard.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_federation_ack.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_federation_sender_shard.py Refactor Measure block metrics to be homeserver-scoped (v2) (#18601) 2025-07-15 15:55:23 -05:00
test_module_cache_invalidation.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_multi_media_repo.py Enable authenticated media by default (#17889) 2024-11-20 14:48:22 +00:00
test_pusher_shard.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_sharded_event_persister.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_sharded_receipts.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00