opentelemetry-dotnet
opentelemetry-dotnet copied to clipboard
Improve format of self-diagnostic log file names
Feature Request
Problem The self-diagnostic feature generates log files in the format of (ProcessName)(ProcessId).log. This is fine if I turn it on, monitor the app and immediately pull it, but we need to help users in scenarios where an application problem is random and could happen at any time on any specific machine.
For cloud environments I may have my web app running on multiple compute nodes and when I'm trying to troubleshoot I want to collect all the self-diagnostic logs from all the machines and use their file names to let me know which machine produced which log. With out more details in the log file name itself, we are at the mercy of asking customers if they can rename those files and make sure we know which log comes from which VM just incase we need to go back to review correlated logs from that device like sys logs, windows logs, etc.
Solution Rename the default Otel Self-Diagnostic Logs to include more distinguishing details. I would like to see something like this:
(YYYYMMDD)-(HHMMSS)-(ServerName)-(ProcessName)-(ProcessId).log
Another consideration may be to start with server name like so:
(ServerName)-(YYYYMMDD)-(HHMMSS)-(ProcessName)-(ProcessId).log
This log file naming convention approach makes it easier for support teams to work with customers. We can ask them for these self-diagnostic logs and know which server trace was captured from. Also, with creation timestamp added to file name, if the first log entry does not mat the file name and is some later date or time then we will automatically know the file rolled over and the log tracing circular buffer was not large enough, so some events may be missing as part of our investigation.
For scenarios where we need to collect these logs from multiple machines and don't know which VM generated the problem, with the file name alone we'd know, once we simply found the exception or specific log entry we are investigating.
I'm interested in working on this. :)
This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.