Skip to content

Truncate large messages displayed in log grid #10882

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Aug 8, 2025

Description

Limit the size of message values written in structured logs grid.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements message truncation for structured logs grid to improve UI performance and readability. The change introduces a new utility method to truncate overly long log messages while preserving their content through tooltips.

  • Added a TruncateText utility method with configurable maximum lengths
  • Updated log message display to truncate messages to 250 characters with full content in tooltips
  • Moved tooltip handling from column level to component level for better control

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/Aspire.Dashboard/Utils/FormatHelpers.cs Added constants for text length limits and TruncateText utility method
src/Aspire.Dashboard/Components/ResourcesGridColumns/LogMessageColumnDisplay.razor Applied message truncation and added tooltip with full message content
src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor Removed column-level tooltip configuration to delegate to component

@davidfowl
Copy link
Member

image?

@JamesNK
Copy link
Member Author

JamesNK commented Aug 8, 2025

It looks exactly the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants