Skip to content
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

Open
domholmes opened this issue Dec 13, 2024 · 1 comment
Labels
bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Comments

@domholmes
Copy link

domholmes commented Dec 13, 2024

Package

OpenTelemetry

Package Version

Package Name Version
OpenTelemetry.Api 1.9.0
OpenTelemetry 1.9.0

Runtime Version

net8.0

Description

Creating a OTEL_DIAGNOSTICS.json in the correct place causes debug log files to be created e.g My.Project.exe.37076.log but they are unreadable

Steps to Reproduce

  1. Configure a working ASP.NET core application that exports OpenTelemetary data as expected
  2. Add a OTEL_DIAGNOSTICS.json file in the root of the project directory
  3. Run the application and generate trace data
  4. Attempt to open the log file written in the same directory

Expected Result

The log is a readable text file

Actual Result

The log is unreadable

Additional Context

{
"LogDirectory": ".",
"FileSize": 32768,
"LogLevel": "Error"
}

@domholmes domholmes added bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member labels Dec 13, 2024
@github-actions github-actions bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Dec 13, 2024
@xiang17
Copy link
Contributor

xiang17 commented Dec 13, 2024

What does the log file look like? The file is written circularly in a fixed size block. And initially it was initialized with all NUL characters, so there may seem to have a lot of garbles after the lines of readable logs at file start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package
Projects
None yet
Development

No branches or pull requests

2 participants