additional metrics

This commit is contained in:
Leath Cooper 2024-10-26 08:17:02 -04:00
parent 56ea91b890
commit 6e49f60fbc
6 changed files with 85 additions and 17 deletions

View file

@ -12,6 +12,7 @@ public class Telemetry
public static readonly Meter AccountingMeter = new("ModernUO.Accounting");
public static readonly Meter ItemsMeter = new("ModernUO.Items");
public static readonly Meter MobilesMeter = new("ModernUO.Mobiles");
public static readonly Meter NetworkMeter = new("ModernUO.Network");
public static readonly Meter EconomyMeter = new("ModernUO.Economy");
public static void Start()
@ -20,12 +21,13 @@ public class Telemetry
.ConfigureResource(r => r.AddService("ModernUO"))
.AddOtlpExporter(options =>
{
options.BatchExportProcessorOptions.ScheduledDelayMilliseconds = TimeSpan.FromSeconds(10.0).Milliseconds;
options.BatchExportProcessorOptions.ScheduledDelayMilliseconds = TimeSpan.FromSeconds(20.0).Milliseconds;
})
.AddMeter("ModernUO.Accounting")
.AddMeter("ModernUO.Items")
.AddMeter("ModernUO.Mobiles")
.AddMeter("ModernUO.Economy")
.AddMeter("ModernUO.Network")
.AddView(
"gold_created_histogram",
new ExplicitBucketHistogramConfiguration()