-
Notifications
You must be signed in to change notification settings - Fork 765
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
Self-diagnostics log file has strange content #2548
Comments
@xiang17 could you take a quick look and see if this is expected? |
Thanks, @cijothomas, for assigning @xiang17 to check it. |
It is expected behavior. The file was never intended to be in a proper text format. The log is written in a fixed-size file in a circular way. Once reached to the end, the self-diagnostics module will even overwrite the log file with new logs from beginning. The reason is described in #1258: The self-diagnostics module is designed to have minimal overhead and bounded resource usage to make it production-ready and developers worry-free from ever-growing log file(s). |
Thank you, @xiang17, for explaining. I think it worth it to add this behavior into Remarks section because it was unexpected for me and I thought that I am doing something in the wrong way. Does fixing it and making the log file to be in a proper text format will require a big overhead to SDK itself? |
Hi @xiang17, Any updates on this issue? cc: @cijothomas @reyang |
I would also like to have that documented.
This will lead to even stranger content when the file starts again from the beginning, especially if this happens mid-stacktrace and you get something that looks like a normally formatted stack trace with impossible content. I don't think "minimal-overhead" in that extreme sense is a desirable feature. I'd rather want a developer-friendly debug feature by default. |
What is the expected way to use this file then? |
Bug Report
I am using OpenTelemetry 1.1.0 (commit
ce46d001d5ed08d91e7750b4859410330d57e7a7
). Running [AspNetCore example] (https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/examples/AspNetCore) with target frameworknetcoreapp3.1
, release configurations andOTEL_DIAGNOSTICS.json
config file:After some requests to https://localhost:5001/WeatherForecast/ the log file
Examples.AspNetCore.exe.41136.log
was created.Examples.AspNetCore.exe.41136.log
When I open .log file in Notepad++ I see there internal events generated by OpenTelemetry (logs) with some unsupported symbols:
But I am expecting to see there only logs.
The text was updated successfully, but these errors were encountered: