Mirror HDX-4376 implicit→body fallback in MCP query tools and alert templates
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api, backend, observability
Research direction
Review #2354 and the existing _ChartConfigSchema plumbing first. Then inspect the listed files under packages/api/src/mcp/tools/query and packages/api/src/tasks/checkAlerts, tracing how each builds ChartConfigWithDateRange. Done means every listed log-source callsite passes bodyExpression alongside implicitColumnExpression, while trace sources remain unchanged.
Written by the indexing model from the issue text.
Description
Follow-up to #2354 (HDX-4376), which added a bare-text Lucene search fallback from `implicitColumnExpression` to `bodyExpression` on log sources.
The UI flow is fixed. For consistency, the same fallback needs to be threaded through backend paths that build their own `ChartConfigWithDateRange` from a source:
- `packages/api/src/mcp/tools/query/helpers.ts` (search MCP tool + raw-SQL tile macros)
- `packages/api/src/mcp/tools/query/runEventPatterns.ts` (event-patterns sample + count configs)
- `packages/api/src/mcp/tools/query/eventDeltas.ts` (event-deltas sample config)
- `packages/api/src/tasks/checkAlerts/index.ts` (`computeAliasWithClauses`)
- `packages/api/src/tasks/checkAlerts/template.ts` (sample-log query in alert template rendering)
For each: when the source is a log source, pull `source.bodyExpression` alongside `source.implicitColumnExpression` and pass both to the chart config. Trace sources stay unchanged.
The schema change in #2354 already added `bodyExpression` to `_ChartConfigSchema` and `RawSqlChartConfigSchema`, so this is purely callsite-level plumbing.
No test coverage gap to backfill: `CustomSchemaSQLSerializerV2` itself is tested in common-utils. The callsites just need to thread the field through.
Effort: ~30 minutes, single-package (api) change.
- Dominant language
- TypeScript
- Stars
- 9.9k
- Forks
- 471
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 117
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hyperdxio/hyperdx
-
enhancement external good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Trace source: document spanLinksValueExpression in the v2 sources external API (OpenAPI parity) Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
count_distinct aggFn on metric tiles ignores valueExpression, always counts distinct metric Values Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement external
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in hyperdxio/hyperdx
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·