add remote_physical_size metric

We do the accounting exclusively after updating remote IndexPart successfully.
This is cleaner & more robust than doing it upon completion of
individual layer file uploads / deletions since we can uset .set()
insteaf of add()/sub().

NB: Originally, this work was intended to be part of #3013 but it
turns out that it's completely orthogonal.
So, spin it out into this PR for easier review.
Since this change is additive, it won't break anything.
This commit is contained in:
Christian Schwarz
2022-12-14 08:53:54 -05:00
committed by Christian Schwarz
parent c04c201520
commit bf3ac2be2d
4 changed files with 62 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ PAGESERVER_PER_TENANT_REMOTE_TIMELINE_CLIENT_METRICS: Tuple[str, ...] = (
"pageserver_remote_operation_seconds_bucket",
"pageserver_remote_operation_seconds_count",
"pageserver_remote_operation_seconds_sum",
"pageserver_remote_physical_size",
)
PAGESERVER_PER_TENANT_METRICS: Tuple[str, ...] = (