Skip to content

Update and align Grafana dashboard to use regex matching for job=~"$job"#19400

Merged
MadLittleMods merged 3 commits intodevelopfrom
madlittlemods/grafana-fix-job-regex
Jan 22, 2026
Merged

Update and align Grafana dashboard to use regex matching for job=~"$job"#19400
MadLittleMods merged 3 commits intodevelopfrom
madlittlemods/grafana-fix-job-regex

Conversation

@MadLittleMods
Copy link
Copy Markdown
Contributor

@MadLittleMods MadLittleMods commented Jan 22, 2026

Update and align Grafana dashboard to use regex matching for job=~"$job".

We're already using job=~"$job" in the majority of the other panels. This is just aligning the stragglers.

Background

For a variable in Grafana, when the "All" value is selected, it translates the variable into a wildcard regex. By default, this is just a giant list of all of the possible values or'd together. It's possible to define a "custom all value" like we've done for index as .* and feels like we should also do this in a follow-up PR.

2026-01-21_19-40

Input:

job="$job"

Before (using exact match) -> resulted in matching nothing:

job="(appservice|background_worker|client_reader|device_lists|event_creator|event_persister|federation_inbound|federation_reader|federation_sender|media_repository|pusher|stream_writers|synapse|synchrotron|user_dir)""

After (using regex match) -> matches all jobs as expected:

job=~"(appservice|background_worker|client_reader|device_lists|event_creator|event_persister|federation_inbound|federation_reader|federation_sender|media_repository|pusher|stream_writers|synapse|synchrotron|user_dir)""

Dev notes

https://prometheus.io/docs/prometheus/latest/querying/basics/#instant-vector-selectors

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

Previously, Grafana translated `job=\"$job\"` to the following when "All" jobs is selected.

Before:

```
job="(appservice|background_worker|client_reader|device_lists|event_creator|event_persister|federation_inbound|federation_reader|federation_sender|media_repository|pusher|stream_writers|synapse|synchrotron|user_dir)""
```

After:

```
job=~"(appservice|background_worker|client_reader|device_lists|event_creator|event_persister|federation_inbound|federation_reader|federation_sender|media_repository|pusher|stream_writers|synapse|synchrotron|user_dir)""
```
@MadLittleMods MadLittleMods marked this pull request as ready for review January 22, 2026 02:24
@MadLittleMods MadLittleMods requested a review from a team as a code owner January 22, 2026 02:24
Copy link
Copy Markdown
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Subtle but looks like it would break a lot of things. Thanks!

Comment thread changelog.d/19400.misc Outdated
@MadLittleMods MadLittleMods merged commit d6b45a7 into develop Jan 22, 2026
35 checks passed
@MadLittleMods MadLittleMods deleted the madlittlemods/grafana-fix-job-regex branch January 22, 2026 17:18
@MadLittleMods
Copy link
Copy Markdown
Contributor Author

Thanks for the review @anoadragon453 🐘

alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Feb 10, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [element-hq/synapse](https://github.com/element-hq/synapse) | minor | `1.146.0` → `1.147.0` |

---

### Release Notes

<details>
<summary>element-hq/synapse (element-hq/synapse)</summary>

### [`v1.147.0`](https://github.com/element-hq/synapse/releases/tag/v1.147.0)

[Compare Source](element-hq/synapse@v1.146.0...v1.147.0)

### Synapse 1.147.0 (2026-02-10)

No significant changes since 1.147.0rc1.

### Synapse 1.147.0rc1 (2026-02-03)

#### Bugfixes

- Fix memory leak caused by not cleaning up stopped looping calls. Introduced in v1.140.0. ([#&#8203;19416](element-hq/synapse#19416))
- Fix a typo that incorrectly made `setuptools_rust` a runtime dependency. ([#&#8203;19417](element-hq/synapse#19417))

#### Internal Changes

- Prune stale entries from `sliding_sync_connection_required_state` table. ([#&#8203;19306](element-hq/synapse#19306))
- Update "Event Send Time Quantiles" graph to only use dots for the event persistence rate (Grafana dashboard). ([#&#8203;19399](element-hq/synapse#19399))
- Update and align Grafana dashboard to use regex matching for `job` selectors (`job=~"$job"`) so the "all" value works correctly across all panels. ([#&#8203;19400](element-hq/synapse#19400))
- Don't retry joining partial state rooms all at once on startup. ([#&#8203;19402](element-hq/synapse#19402))
- Disallow requests to the health endpoint from containing trailing path characters. ([#&#8203;19405](element-hq/synapse#19405))
- Add notes that new experimental features should have associated tracking issues. ([#&#8203;19410](element-hq/synapse#19410))
- Bump `pyo3` from 0.26.0 to 0.27.2 and `pythonize` from 0.26.0 to 0.27.0. Contributed by [@&#8203;razvp](https://github.com/razvp) @&#8203; ERCOM. ([#&#8203;19412](element-hq/synapse#19412))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zLjYiLCJ1cGRhdGVkSW5WZXIiOiI0My4zLjYiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImltYWdlIl19-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3877
Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net>
Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants