Skip to content

Show OLTP timestamps using user's time format preferences#2135

Merged
drewnoakes merged 1 commit into
microsoft:mainfrom
drewnoakes:fix-1551-date-formats
Feb 12, 2024
Merged

Show OLTP timestamps using user's time format preferences#2135
drewnoakes merged 1 commit into
microsoft:mainfrom
drewnoakes:fix-1551-date-formats

Conversation

@drewnoakes

@drewnoakes drewnoakes commented Feb 8, 2024

Copy link
Copy Markdown
Member

Fixes #1551

We want to show certain timestamps with millisecond-level precision, however there's no built-in format that respects the user's time formatting preferences while also showing milliseconds. Microsoft docs provided the approach taken here, which uses the user's default pattern (which comes from the machines culture and may be overridden by the user at the system level), and modifies it to append milliseconds after the seconds. It respects the user's preference for decimal separators too.

Resources view

image

Structured logs

image

Traces

image

Microsoft Reviewers: Open in CodeFlow

We want to show timestamps with millisecond-level precision, however there's no built-in format string for that that respects the user's preferences. Microsoft docs provided the approach taken here, which uses the user's default pattern (which comes from the machines culture and may be overridden by the user at the system level), and modifies it to append milliseconds after the seconds. It respects the user's preference for decimal separators too.
@drewnoakes drewnoakes added the area-telemetry Telemetry from the Aspire app to the dashboard label Feb 8, 2024

@JamesNK JamesNK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good

Comment thread src/Aspire.Dashboard/Otlp/Model/OtlpHelpers.cs
Comment thread src/Aspire.Dashboard/Otlp/Model/OtlpHelpers.cs
Comment thread src/Aspire.Dashboard/Otlp/Model/OtlpHelpers.cs
@drewnoakes drewnoakes merged commit 9169bf0 into microsoft:main Feb 12, 2024
@drewnoakes drewnoakes deleted the fix-1551-date-formats branch February 12, 2024 00:12
radical pushed a commit to radical/aspire that referenced this pull request Feb 12, 2024
…2135)

We want to show timestamps with millisecond-level precision, however there's no built-in format string for that that respects the user's preferences. Microsoft docs provided the approach taken here, which uses the user's default pattern (which comes from the machines culture and may be overridden by the user at the system level), and modifies it to append milliseconds after the seconds. It respects the user's preference for decimal separators too.
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-telemetry Telemetry from the Aspire app to the dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date formats on Dashboard aren't consistently honoring regional config

2 participants