Explore/Loki: Remove regex parsing errors for huge logs (#26405)

* Remove hihglihting for logs with more than 5000 characters

* Update limitt, include also parsing for details

* Update
This commit is contained in:
Ivana Huckova
2020-08-04 14:37:07 +02:00
committed by GitHub
parent 6a86e66d76
commit 150778df1a
3 changed files with 17 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ import store from 'app/core/store';
import { ExploreGraphPanel } from './ExploreGraphPanel';
import { MetaInfoText } from './MetaInfoText';
import { RowContextOptions } from '@grafana/ui/src/components/Logs/LogRowContextProvider';
import { MAX_CHARACTERS } from '@grafana/ui/src/components/Logs/LogRowMessage';
const SETTINGS_KEYS = {
showLabels: 'grafana.explore.logs.showLabels',
@@ -181,6 +182,14 @@ export class Logs extends PureComponent<Props, State> {
});
}
if (logRows.some(r => r.entry.length > MAX_CHARACTERS)) {
meta.push({
label: 'Info',
value: 'Logs with more than 100,000 characters could not be parsed and highlighted',
kind: LogsMetaKind.String,
});
}
const scanText = scanRange ? `Scanning ${rangeUtil.describeTimeRange(scanRange)}` : 'Scanning...';
const series = logsSeries ? logsSeries : [];