mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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 : [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user