Skip to content

envd: avoid regex matching in Prometheus queries#35305

Merged
teskje merged 1 commit intoMaterializeInc:mainfrom
teskje:metrics-queries-no-regex
Mar 3, 2026
Merged

envd: avoid regex matching in Prometheus queries#35305
teskje merged 1 commit intoMaterializeInc:mainfrom
teskje:metrics-queries-no-regex

Conversation

@teskje
Copy link
Contributor

@teskje teskje commented Mar 3, 2026

For the queries that expose all transient collections in a single "transient" bucket, we simply need to switch on the first character of the collection ID. No need to invoke the regex machinery for that.

Motivation

This removes an inefficiency identified in Slack. Not clear if it's really noticeable, but no harm in fixing it.

@teskje teskje requested a review from a team as a code owner March 3, 2026 09:21
@teskje teskje requested a review from ggevay March 3, 2026 09:21
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone.

PR title guidelines

  • Use imperative mood: "Fix X" not "Fixed X" or "Fixes X"
  • Be specific: "Fix panic in catalog sync when controller restarts" not "Fix bug" or "Update catalog code"
  • Prefix with area if helpful: compute: , storage: , adapter: , sql:

Pre-merge checklist

  • The PR title is descriptive and will make sense in the git log.
  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).

Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

For the queries that expose all transient collections in a single
"transient" bucket, we simply need to switch on the first character of
the collection ID. No need to invoke the regex machinery for that.
@teskje teskje force-pushed the metrics-queries-no-regex branch from b4b5cb8 to ee4f26a Compare March 3, 2026 09:44
@teskje
Copy link
Contributor Author

teskje commented Mar 3, 2026

TFTR!

@teskje teskje merged commit 382362f into MaterializeInc:main Mar 3, 2026
126 checks passed
@teskje teskje deleted the metrics-queries-no-regex branch March 3, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants