mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 21:37:41 +00:00
## Summary - Fix external API `POST /api/v2/charts/series` returning `"no query support for metric type=gauge"` when `field` is passed without `metricName` - When querying metric sources, the API now falls back to using `field` as the `metricName` and defaults `valueExpression` to `'Value'` (the ClickHouse column), matching how the dashboard UI builds chart configs - Backward compatible: when both `metricName` and `field` are provided, behavior is unchanged ## Root Cause `buildChartConfigFromRequest()` mapped `field` to `valueExpression` but never populated `metricName` from it. Downstream, `translateMetricChartConfig()` requires both `metricType` AND `metricName` to be truthy — when `metricName` was undefined, it fell through to the catch-all error. ## Test plan - [ ] Added integration tests for gauge, sum, and histogram metrics using `field` without `metricName` - [ ] Verify existing metric tests still pass (backward compatible — passing both `metricName` and `field` works as before) - [ ] Verify non-metric source queries are unaffected Related: https://github.com/hyperdxio/hyperdx/issues/1418, https://github.com/hyperdxio/hyperdx/issues/1214 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <81847+claude@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| docs/auto_provision | ||
| migrations | ||
| scripts | ||
| src | ||
| .Dockerignore | ||
| .env.development | ||
| .env.e2e | ||
| .env.test | ||
| CHANGELOG.md | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| jest.config.js | ||
| jest.setup.ts | ||
| migrate-mongo-config.ts | ||
| nodemon.json | ||
| openapi.json | ||
| package.json | ||
| tsconfig.build.json | ||
| tsconfig.json | ||