dotnet / dotnet-monitor

This repository contains the source code for .NET Monitor - a tool that allows you to gather diagnostic data from running applications using HTTP endpoints
MIT License
617 stars 103 forks source link

Request for always-on/low overhead collection mode #85

Open timmydo opened 3 years ago

timmydo commented 3 years ago

Background and Motivation

I have a program that utilizes a lot of event source tracing. Currently we have a custom tool on Windows that listens to these events using ETW and logs them to rotated files (every 15 min or after a couple of GB). We'd like a cross-platform replacement.

Proposed Feature

dotnet-monitor to have a mode that always collects the configured event sources. Perhaps it could launch without a web server and accept an EventPipeConfiguration from a file. Also accept a RollingFileSystemEgressProvider that provides a way to configure the max output file size, max output duration, and max files to keep.

Usage Examples

dotnet monitor log config.json

config.json:

{ "EventPipeConfiguration":
  {"Providers": [{"Name":"Microsoft-Windows-DotNETRuntime","Keywords":"32769","EventLevel":4,"Arguments":null}]
  "RequestRundown":false,
  "BufferSizeInMB":256
  }
  "EgressProviders": [
{"Type": "RollingFileSystem", "DirectoryPath": "...", "IntermediateDirectory": "..."}]
}
wiktork commented 3 years ago

Likely need to finish #69 first