question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Self-diagnostics log file has strange content

See original GitHub issue

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 framework netcoreapp3.1, release configurations and OTEL_DIAGNOSTICS.json config file:

{
    "LogDirectory": ".",
    "FileSize": 1024,
    "LogLevel": "LogAlways"
}

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:

image

But I am expecting to see there only logs.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Oberon00commented, Dec 15, 2021

@xiang17

The file was never intended to be in a proper text format.

What is the expected way to use this file then?

1reaction
Oberon00commented, Dec 15, 2021

I would also like to have that documented.

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).

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

weird characters in log session
I think you you find that shows the content of the file with the colour intact — not showing the control chars themselves....
Read more >
Application Insights - Not getting data for one IIS site [closed]
I configured it yesterday and the strange thing is that this site was sending data briefly from one server only, and then that...
Read more >
Using SQL Server Diagnostics (Preview) | All About Data
These files are located in the \LOG\ folder of your install. The information for my instance was as below. Dark Clouds Are Ahead....
Read more >
strange characters in the log file from bash + how to avoid ...
linux - strange characters in the log file from bash + how to avoid them ? - Unix & Linux Stack Exchange.
Read more >
we're still setting up the microsoft team for this group
Hello, I'm setting up in Microsoft 365 groups an external collaborator, he has access to the Sharepoint Site, but then he tries to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found