storcon: fix eliding parameters from proxied URL labels (#10817)

## Problem

We had code for stripping IDs out of proxied paths to reduce cardinality
of metrics, but it was only stripping out tenant IDs, and leaving in
timeline IDs and query parameters (e.g. LSN in lsn->timestamp lookups).

## Summary of changes

- Use a more general regex approach.

There is still some risk that a future pageserver API might include a
parameter in `/the/path/`, but we control that API and it is not often
extended. We will also alert on metrics cardinality in staging so that
if we made that mistake we would notice.
This commit is contained in:
John Spray
2025-02-14 09:57:19 +00:00
committed by GitHub
parent 8bdb1828c8
commit 996f0a3753
3 changed files with 27 additions and 4 deletions

1
Cargo.lock generated
View File

@@ -6462,6 +6462,7 @@ dependencies = [
"pageserver_client",
"postgres_connection",
"rand 0.8.5",
"regex",
"reqwest",
"routerify",
"rustls 0.23.18",