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

Commit

Permalink
Drop synapse_storage_transaction_time_bucket
Browse files Browse the repository at this point in the history
This particular metric has a much too high cardinality due to the fact
that the desc label can have (at present) 248 values. This results in
over 3k series per Synapse. If you have a Prometheus instance that
monitors multiple Synpase instances it results in a huge amount of
additional series to ingest.

The metric in question is also not used in the Synapse dashboard and
the core team has indicated they're happy to drop this metric entirely.

Fixes #11081

Signed-off-by: Daniele Sluijters <daenney@users.noreply.github.com>
  • Loading branch information
daenney committed Oct 19, 2021
1 parent a6c3187 commit e08a76f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/11124.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the `synapse_storage_transaction_time_bucket` metric due to the high cardinality of the metric putting undue strain on Prometheus deployments. This metric is not used in Synapse's included Grafana dashboards.
2 changes: 0 additions & 2 deletions synapse/storage/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
sql_scheduling_timer = Histogram("synapse_storage_schedule_time", "sec")

sql_query_timer = Histogram("synapse_storage_query_time", "sec", ["verb"])
sql_txn_timer = Histogram("synapse_storage_transaction_time", "sec", ["desc"])


# Unique indexes which have been added in background updates. Maps from table name
Expand Down Expand Up @@ -639,7 +638,6 @@ def new_transaction(

self._current_txn_total_time += duration
self._txn_perf_counters.update(desc, duration)
sql_txn_timer.labels(desc).observe(duration)

async def runInteraction(
self,
Expand Down

0 comments on commit e08a76f

Please sign in to comment.