mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix: getLogBatchGroupedByBody missing return bug (#115)
This commit is contained in:
parent
b189070be0
commit
9a72b85ea8
3 changed files with 9 additions and 3 deletions
6
.changeset/bright-hornets-drop.md
Normal file
6
.changeset/bright-hornets-drop.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'@hyperdx/api': patch
|
||||
'@hyperdx/app': patch
|
||||
---
|
||||
|
||||
fix: getLogBatchGroupedByBody missing return bug (regression)
|
||||
|
|
@ -1694,6 +1694,9 @@ export const getLogBatchGroupedByBody = async ({
|
|||
span.end();
|
||||
},
|
||||
);
|
||||
|
||||
// @ts-ignore
|
||||
return result;
|
||||
};
|
||||
|
||||
export const getLogBatch = async ({
|
||||
|
|
|
|||
|
|
@ -109,12 +109,10 @@ router.get('/patterns', isUserAuthenticated, async (req, res, next) => {
|
|||
teamId: teamId.toString(),
|
||||
});
|
||||
|
||||
// @ts-expect-error
|
||||
if (logs.data.length === 0) {
|
||||
return res.json({ data: [] });
|
||||
}
|
||||
|
||||
// @ts-expect-error
|
||||
// use the 1st id as the representative id
|
||||
const lines = logs.data.map(log => [log.ids[0], log.body]);
|
||||
// TODO: separate patterns by service
|
||||
|
|
@ -136,7 +134,6 @@ router.get('/patterns', isUserAuthenticated, async (req, res, next) => {
|
|||
trends: Record<string, number>;
|
||||
}
|
||||
> = {};
|
||||
// @ts-expect-error
|
||||
for (const log of logs.data) {
|
||||
const patternId = logsPatternsData.result[log.ids[0]];
|
||||
if (patternId) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue