Skip to content

Commit 9b8e15c

Browse files
authored
feat(logs): Show ms in timestamps column (#92213)
<img width="1182" alt="image" src="https://github.com/user-attachments/assets/1dcb7f68-34cb-4b94-9391-310d0b3b5cff" />
1 parent b736c0b commit 9b8e15c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

static/app/views/explore/logs/fieldRenderers.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,15 @@ export function SeverityCircleRenderer(props: Omit<LogFieldRendererProps, 'item'
116116
}
117117

118118
function TimestampRenderer(props: LogFieldRendererProps) {
119+
const preciseTimestamp =
120+
props.extra.attributes?.['tags[sentry.timestamp_precise,number]'];
121+
const timestampToUse = preciseTimestamp
122+
? new Date(Number(preciseTimestamp) / 1_000_000) // Convert nanoseconds to milliseconds
123+
: props.item.value;
124+
119125
return (
120126
<LogDate align={props.extra.align}>
121-
<DateTime seconds date={props.item.value} />
127+
<DateTime seconds date={timestampToUse} format="MMM D, h:mm:ss.SSS A" />
122128
</LogDate>
123129
);
124130
}

0 commit comments

Comments
 (0)