etishor / Metrics.NET

The Metrics.NET library provides a way of instrumenting applications with custom metrics (timers, histograms, counters etc) that can be reported in various ways and can provide insights on what is happening inside a running application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accepted way of "rolling" perf counters?

rapoth opened this issue · comments

This is a fantastic project! I'm wondering what is the suggested way for rolling perf counter data. For instance, if you look at Serilog, there is a provision for providing a date format using which the perf files are rolled. This makes it very easy to implement retention policies (e.g., retain only the last 3 days worth of perf data).

What are your thoughts on this?

@rapoth I'm assuming you are referring to the CSV metrics that get written to a file. For that there is no support for rolling files.

There is an implementation using NLog for logging the metrics - and NLog can write to rolling files - but it is not in the core package because of the dependency on NLog and not published to nuget because it is not tested/used. Take a look at the NLog Adapter for more information.

Anyway of you care about persistent metrics, the general recommendation is to use a timeseries database like graphite or influxdb.

@etishor Thanks Iulian! I'll check this out.