You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[AzureTools][Aspire] The sequence number of the log changes when returning "Resource" and then clicking "View" of the project or container under the "Logs" in the Dashboard again #4893
The change to only listen while the Console logs page is open means that logs are fetched from DCP and "replayed" into memory in the host. That causes issues:
The order of logs is wrong. When logs are replayed, the data is merged from std-out, err-out, etc, into one stream. No thought is given to when they originally arrived when merging them together. Imagine an app that ran for 10 minutes, and during that time it evenly wrote 1000 logs to std-out, and 10 logs to err-out. All the error logs are near the beginning of the log output instead of spaced evenly. Also, it is a race to add logs from different sources into the single stream, so logs from std-out and err-out will change order.
The line number is wrong. Each time logs are replayed then log number increases. Imagine there are 10 logs. Instead of always showing lines 1-10, each refresh of the page increases the number. It goes to 11-20, 21-30, 31-40, etc.
Logs written to ResourceLoggerService are lost. The way this feature was implemented is it assumed it could add a log to host's in-memory collection. However, now that in-memory collection is cleared and refilled when DCP logs when someone views the Console logs page.
Activity
adamint commentedon Jul 16, 2024
Mitch Denny (@mitchdenny) this isn't coming from dashboard, maybe from AppHost? see mention above.
mitchdenny commentedon Jul 21, 2024
I think we discussed tackling this in 8.2.
kvenkatrajan commentedon Aug 7, 2024
We will need to bump up the priority if logs are out of order or lost. Can someone confirm if that is the case? Karol Zadora-Przylecki (@karolz-ms) / Mitch Denny (@mitchdenny) / Adam Ratzman (@adamint)
CC: Jose Perez Rodriguez (@joperezr) Aditya Mandaleeka (@adityamandaleeka)
karolz-ms commentedon Aug 7, 2024
Based on the screenshot, this might be a duplicate of #4942, which was fixed yesterday.
JamesNK commentedon Aug 8, 2024
The blank lines are unrelated.
JamesNK commentedon Aug 8, 2024
The issues with logging are caused by how logging was originally designed: the host is always listening to logs from DCP and stores them in memory. That design was then changed to only listening when someone views the Console logs page in the dashboard.
The change to only listen while the Console logs page is open means that logs are fetched from DCP and "replayed" into memory in the host. That causes issues:
The order of logs is wrong. When logs are replayed, the data is merged from std-out, err-out, etc, into one stream. No thought is given to when they originally arrived when merging them together. Imagine an app that ran for 10 minutes, and during that time it evenly wrote 1000 logs to std-out, and 10 logs to err-out. All the error logs are near the beginning of the log output instead of spaced evenly. Also, it is a race to add logs from different sources into the single stream, so logs from std-out and err-out will change order.
The line number is wrong. Each time logs are replayed then log number increases. Imagine there are 10 logs. Instead of always showing lines 1-10, each refresh of the page increases the number. It goes to 11-20, 21-30, 31-40, etc.
Logs written to
ResourceLoggerServiceare lost. The way this feature was implemented is it assumed it could add a log to host's in-memory collection. However, now that in-memory collection is cleared and refilled when DCP logs when someone views the Console logs page.JamesNK commentedon Aug 17, 2024
Bug in DCP that didn't add timestamps to some logs is resolved. Will look at this next week.
Rita003 commentedon Aug 21, 2024
Verify this issue fixed on the latest Aspire 8.1.1-preview.1.24420.9