-
Notifications
You must be signed in to change notification settings - Fork 782
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
[bug] The log generated by setting OTEL_DIAGNOSTICS.json is binary and unreadable #6024
Comments
What does the log file look like? The file is written circularly in a fixed size block. And initially it was initialized with all |
Hi there. Most editors won't open it, reporting it as binary. Those that do, there are no readable characters at the start, even changing the LogLevel to ensure something should be printed. |
Can you give a minimal sample app that can reproduce the issue? |
Ok so I did some more digging and the problem is that the log isn't overwritten with readable data until the This is only a problem when manually creating tracers with |
I couldn't reproduce the issue with your sample app. I ran the test app and it generated expected file. If you opened the file with Visual Studio Code, you might see warning while opening: "The file is not displayed in the text editor because it is either binary or uses an unsupported text encoding." Select "Open Anyway" and choose the built-in Text Editor. The file would look like: I also tried to comment out |
Package
OpenTelemetry
Package Version
Runtime Version
net8.0
Description
Creating a
OTEL_DIAGNOSTICS.json
in the correct place causes debug log files to be created e.gMy.Project.exe.37076.log
but they are unreadableSteps to Reproduce
OTEL_DIAGNOSTICS.json
file in the root of the project directoryExpected Result
The log is a readable text file
Actual Result
The log is unreadable
Additional Context
{
"LogDirectory": ".",
"FileSize": 32768,
"LogLevel": "Error"
}
The text was updated successfully, but these errors were encountered: