Fix Failed to stop metrics warnings in request metrics (#18753)
```
Failed to stop metrics: TypeError("prometheus_client.metrics.MetricWrapperBase.labels() got multiple values for keyword argument 'server_name'")
```
Noticed while running and debugging some tests.
This bug was introduced in
https://github.com/element-hq/synapse/pull/18724
This commit is contained in:
1
changelog.d/18753.misc
Normal file
1
changelog.d/18753.misc
Normal file
@@ -0,0 +1 @@
|
||||
Refactor `Histogram` metrics to be homeserver-scoped.
|
||||
@@ -243,7 +243,6 @@ class RequestMetrics:
|
||||
response_timer.labels(
|
||||
code=response_code_str,
|
||||
**response_base_labels,
|
||||
**{SERVER_NAME_LABEL: self.our_server_name},
|
||||
).observe(time_sec - self.start_ts)
|
||||
|
||||
resource_usage = context.get_resource_usage()
|
||||
|
||||
Reference in New Issue
Block a user