diff --git a/frontend/src/components/Logs/RawLogView/index.tsx b/frontend/src/components/Logs/RawLogView/index.tsx index 7c630a2939..f5ea5b674e 100644 --- a/frontend/src/components/Logs/RawLogView/index.tsx +++ b/frontend/src/components/Logs/RawLogView/index.tsx @@ -60,12 +60,14 @@ function RawLogView({ const isDarkMode = useIsDarkMode(); const isReadOnlyLog = !isLogsExplorerPage || isReadOnly; + const severityText = data.severity_text ? `${data.severity_text} |` : ''; + const text = useMemo( () => typeof data.timestamp === 'string' - ? `${dayjs(data.timestamp).format()} | ${data.body}` - : `${dayjs(data.timestamp / 1e6).format()} | ${data.body}`, - [data.timestamp, data.body], + ? `${dayjs(data.timestamp).format()} | ${severityText} ${data.body}` + : `${dayjs(data.timestamp / 1e6).format()} | ${severityText} ${data.body}`, + [data.timestamp, data.body, severityText], ); const handleClickExpand = useCallback(() => { @@ -114,11 +116,6 @@ function RawLogView({ [text], ); - const mouseActions = useMemo( - () => ({ onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }), - [handleMouseEnter, handleMouseLeave], - ); - return ( {!isReadOnly && ( diff --git a/frontend/src/container/LogDetailedView/utils.tsx b/frontend/src/container/LogDetailedView/utils.tsx index c07c4c7622..02890e7dc9 100644 --- a/frontend/src/container/LogDetailedView/utils.tsx +++ b/frontend/src/container/LogDetailedView/utils.tsx @@ -198,6 +198,7 @@ export const aggregateAttributesResourcesToString = (logData: ILog): string => { traceId: logData.traceId, attributes: {}, resources: {}, + severity_text: logData.severity_text, }; Object.keys(logData).forEach((key) => { diff --git a/frontend/src/types/api/logs/log.ts b/frontend/src/types/api/logs/log.ts index 0b519936a6..15b7f24c74 100644 --- a/frontend/src/types/api/logs/log.ts +++ b/frontend/src/types/api/logs/log.ts @@ -13,6 +13,7 @@ export interface ILog { attributes_string: Record; attributesInt: Record; attributesFloat: Record; + severity_text: string; } type OmitAttributesResources = Pick<