Skip to content

Commit

Permalink
Fix metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Thiago Padilha <[email protected]>
  • Loading branch information
tchrono authored and edsiper committed Oct 5, 2023
1 parent b401a72 commit ab70fbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/frontend/hooks/useFluentBitStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ async function fetchStream(vivoExporterUrl: string, kind: StreamKind, lastId: nu
continue;
}
const record = JSON.parse(line)
records.push({ record, rawEvent: JSON.stringify(record[1]), rawMetadata: JSON.stringify(record[0][1]), id: id-- });
if (Array.isArray(record)) {
records.push({ record, rawEvent: JSON.stringify(record[1]), rawMetadata: JSON.stringify(record[0][1]), id: id-- });
} else {
records.push({ record, id: id-- });
}
}
return records
}
Expand Down

0 comments on commit ab70fbe

Please sign in to comment.