Text File Reporter
The App.Metrics.Extensions.Reporting.TextFile nuget package is an App Metrics report provider which will output metrics to a text file at a specified interval.
- First see the getting started guide.
- Configure the text file reporter as follows:
.AddReporting(factory =>
{
factory.AddTextFile(
new TextFileReporterSettings
{
ReportInterval = TimeSpan.FromSeconds(5),
FileName = @"C:\metrics\sample.txt"
},
new AsciiMetricPayloadBuilder());
})
Tip
The example above is using the AsciiMetricPayloadBuilder, this can be substituted with with any of the InfluxDB, Elasticsearch, Prometheus, Graphite, App Metrics JSON, or a custom payload builder.