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

Commit 6546308

Browse files
authored
Disable legacy Prometheus metric names by default. They can still be re-enabled for now, but they will be removed altogether in Synapse 1.73.0. (#14353)
1 parent 051402d commit 6546308

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

CHANGES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Synapse (Next) (2022-11-01)
2+
=========================
3+
4+
Please note that, as announced in the release notes for Synapse 1.69.0, legacy Prometheus metric names are now disabled by default.
5+
They will be removed altogether in Synapse 1.73.0.
6+
If not already done, server administrators should update their dashboards and alerting rules to avoid using the deprecated metric names.
7+
See the [upgrade notes](https://matrix-org.github.io/synapse/v1.71/upgrade.html#upgrading-to-v1710) for more details.
8+
9+
110
Synapse 1.71.0rc1 (2022-11-01)
211
==============================
312

changelog.d/14353.removal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disable legacy Prometheus metric names by default. They can still be re-enabled for now, but they will be removed altogether in Synapse 1.73.0.

docs/upgrade.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@ local users and some remote users is why the spec was changed/clarified and this
116116
caveat is no longer supported.
117117
118118
119+
## Legacy Prometheus metric names are now disabled by default
120+
121+
Synapse v1.71.0 disables legacy Prometheus metric names by default.
122+
For administrators that still rely on them and have not yet had chance to update their
123+
uses of the metrics, it's still possible to specify `enable_legacy_metrics: true` in
124+
the configuration to re-enable them temporarily.
125+
126+
Synapse v1.73.0 will **remove legacy metric names altogether** and at that point,
127+
it will no longer be possible to re-enable them.
128+
129+
If you do not use metrics or you have already updated your Grafana dashboard(s),
130+
Prometheus console(s) and alerting rule(s), there is no action needed.
131+
132+
See [v1.69.0: Deprecation of legacy Prometheus metric names](#deprecation-of-legacy-prometheus-metric-names).
133+
134+
119135
# Upgrading to v1.69.0
120136

121137
## Changes to the receipts replication streams

docs/usage/configuration/config_documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,8 +2441,8 @@ enable_metrics: true
24412441

24422442
Set to `true` to publish both legacy and non-legacy Prometheus metric names,
24432443
or to `false` to only publish non-legacy Prometheus metric names.
2444-
Defaults to `true`. Has no effect if `enable_metrics` is `false`.
2445-
**In Synapse v1.71.0, this will default to `false` before being removed in Synapse v1.73.0.**
2444+
Defaults to `false`. Has no effect if `enable_metrics` is `false`.
2445+
**In Synapse v1.67.0 up to and including Synapse v1.70.1, this defaulted to `true`.**
24462446

24472447
Legacy metric names include:
24482448
- metrics containing colons in the name, such as `synapse_util_caches_response_cache:hits`, because colons are supposed to be reserved for user-defined recording rules;

synapse/config/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class MetricsConfig(Config):
4343
def read_config(self, config: JsonDict, **kwargs: Any) -> None:
4444
self.enable_metrics = config.get("enable_metrics", False)
4545

46-
self.enable_legacy_metrics = config.get("enable_legacy_metrics", True)
46+
self.enable_legacy_metrics = config.get("enable_legacy_metrics", False)
4747

4848
self.report_stats = config.get("report_stats", None)
4949
self.report_stats_endpoint = config.get(

0 commit comments

Comments
 (0)