dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.38k stars 351 forks source link

Dashboard: Traces & Log messages - viewer for long fields #4412

Open samsp-msft opened 1 month ago

samsp-msft commented 1 month ago

There is an initiative to use OTel to provide telemetry for LLM applications - recording the prompt and response text. These are typically long and can be plain text or json. When looking at these in the Aspire dashboard, in the trace and logs view, the details pane has a one line display with a "..." and button to copy to the dashboard.

image

Visual Studio debugger has the same problem when its showing variables in the watch window. It has an option to pop out the value in a modal dialog, where text can be more easily examined. We should have something similar for the dashboard.

image

image

When the text is opened in the viewer, we should have a quick mechanism to sniff to see if it looks to be json, and then provide an option to format the content as json - as it typically will not have any formatting. The VS one has the ability to do base64, url encoding/decoding. Those are probably not needed here, but JSON and possibly XML formatting would be very useful. If it fails to parse that would also be really useful to know, so spitting out the error in those cases would be good.

davidfowl commented 1 month ago

This feels very important. Makes the dashboard a bit unusable with large text values.

samsp-msft commented 3 weeks ago

I am thinking something like: image

leslierichardson95 commented 3 weeks ago

TODO: Figure out an owner here.

samsp-msft commented 3 weeks ago

This will also be needed for events on spans in the trace details view, as those will also have the same long messages attached. image

adamint commented 2 weeks ago

@kvenkatrajan for assignment.