Skip to content

Commit e05bd6b

Browse files
authored
fix: include saved search filters in alert queries (#1882)
HDX-3625 ## Summary - Saved search alerts were ignoring the `filters` field when building the ClickHouse chart config in `getChartConfigFromAlert` - This caused alerts on saved searches with SQL filters (e.g., `ServiceName IN ('hdx-oss-dev-api')`, `SeverityText IN ('info')`) to evaluate against unfiltered data, producing incorrect alert results - Added `filters: savedSearch.filters` to the chart config so `renderChartConfig` includes filter conditions in the WHERE clause
1 parent 26759f7 commit e05bd6b

4 files changed

Lines changed: 420 additions & 2 deletions

File tree

‎.changeset/brave-foxes-hunt.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@hyperdx/api': patch
3+
---
4+
5+
Include saved search filters in alert ClickHouse queries

‎CLAUDE.md‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,27 @@ When working on issues or PRs through the GitHub Action:
112112

113113
1. **Before writing any code**, post a comment outlining your implementation
114114
plan — which files you'll change, what approach you'll take, and any
115-
trade-offs or risks. Use `gh issue comment` for issues or `gh pr comment`
116-
for PRs.
115+
trade-offs or risks. Use `gh issue comment` for issues or `gh pr comment` for
116+
PRs.
117117

118118
2. **After making any code changes**, always run these in order and fix any
119119
failures before opening a PR:
120+
120121
- `make ci-lint` — lint + TypeScript type check
121122
- `make ci-unit` — unit tests
122123

123124
3. Write a clear PR description explaining what changed and why.
124125

126+
## Git Commits
127+
128+
When committing code, use the git author's default profile (name and email from
129+
git config). Do not add `Co-Authored-By` trailers.
130+
131+
**Pre-commit hooks must pass before committing.** Do not use `--no-verify` to
132+
skip hooks. If the pre-commit hook fails (e.g. due to husky not being set up in
133+
a worktree), run `npx lint-staged` manually before committing to ensure lint and
134+
formatting checks pass. Fix any issues before creating the commit.
135+
125136
---
126137

127138
_Need more details? Check the `agent_docs/` directory or ask which documentation

0 commit comments

Comments
 (0)