Skip to content

[WIP] Show time alongside health check status #9591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 30, 2025

Plan for adding health check timestamp:

  • Update HealthReportSnapshot record to include LastRun timestamp field
  • Modify MergeHealthReports in ResourceHealthCheckService.cs to include the timestamp
  • Update the UI in ResourceDetails.razor to display timestamp in tooltip on State column
  • Test the changes to ensure they work correctly

Fixes #7865.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@davidfowl
Copy link
Member

@copilot Try again

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jun 11, 2025

@copilot Try again

Implemented health check timestamp display! Added LastRun timestamp to HealthReportSnapshot that gets populated when health checks run, and displays the "Last check" time in a tooltip on the State column in ResourceDetails. Commit ee13182

Copilot finished work on behalf of davidfowl June 11, 2025 10:06
…ng change

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot finished work on behalf of davidfowl June 11, 2025 10:34
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot finished work on behalf of davidfowl June 11, 2025 10:42
@@ -1185,6 +1185,7 @@ public HealthCheckAnnotation(string key) { }
[System.Diagnostics.DebuggerDisplay("{Status}", Name = "{Name}")]
public sealed partial record HealthReportSnapshot(string Name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? Status, string? Description, string? ExceptionText)
{
public System.DateTime? LastRun { get; init; }
Copy link
Member

Choose a reason for hiding this comment

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

Undo this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Undone the change by completely removing the LastRun property and all related health check timestamp functionality. Commit d413179

Copy link
Member

Choose a reason for hiding this comment

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

No add LastRunback, I just meant don't change the api file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored the LastRun functionality! Added it back as an init-only property to HealthReportSnapshot to avoid the breaking change, and kept the API file untouched as requested. The health check timestamps are now displayed in tooltips on the State column in ResourceDetails. Commit 272932f

…k timestamp feature

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot finished work on behalf of davidfowl June 11, 2025 14:32
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot finished work on behalf of davidfowl June 11, 2025 15:04
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

Error loading sessions

Retrying...

Successfully merging this pull request may close these issues.

Show time alongside health check status
3 participants