Skip to content

Use sub-second timestamps in logs#2018

Merged
Litarnus merged 6 commits intogetsentry:masterfrom
martinstuecklschwaiger:sub-second-log-timestamps
Mar 12, 2026
Merged

Use sub-second timestamps in logs#2018
Litarnus merged 6 commits intogetsentry:masterfrom
martinstuecklschwaiger:sub-second-log-timestamps

Conversation

@martinstuecklschwaiger
Copy link
Contributor

Sentry UI shows timestamps as Feb 18, 17:48:27.000 CET (milliseconds as 000).

Description

Breadcrumb timestamps use floats. Monolog also supports sub-second timestamps from DateTimeImmutable. This pull request uses split-second timestamps for creating Breadcrumbs in the Monolog BreadcrumbHandler.

@Litarnus
Copy link
Contributor

Litarnus commented Mar 4, 2026

Hi @martinstuecklschwaiger! Thanks for opening the PR!

It looks good to me. Since you added a fix for pre-1970 timestamps, can you also add a quick test for that?

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link
Contributor

@Litarnus Litarnus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@Litarnus Litarnus merged commit 7074c49 into getsentry:master Mar 12, 2026
46 checks passed
@martinstuecklschwaiger martinstuecklschwaiger deleted the sub-second-log-timestamps branch March 12, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants