449 B
449 B
Custom Metrics
Record custom application metrics.
Recording Custom Metrics
var meter = new Meter("MyApp.Events");
var counter = meter.CreateCounter<long>("custom.events.processed");
counter.Add(1, new KeyValuePair<string, object?>("type", "OrderPlaced"));
var histogram = meter.CreateHistogram<double>("custom.processing.duration");
histogram.Record(duration.TotalMilliseconds);