From c3ee4ce0678d36133975fa40f0cdd47dcf96357b Mon Sep 17 00:00:00 2001 From: awaescher Date: Sun, 19 May 2024 11:15:31 +0200 Subject: [PATCH] Update metrics names --- MaxPower/HostedServices/ExporterService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MaxPower/HostedServices/ExporterService.cs b/MaxPower/HostedServices/ExporterService.cs index 542ace5..0a1168c 100644 --- a/MaxPower/HostedServices/ExporterService.cs +++ b/MaxPower/HostedServices/ExporterService.cs @@ -5,10 +5,10 @@ namespace MaxPower.HostedServices; public class ExporterService(MaxSettings maxSettings, IEnumerable inverters, IMaxTalkClient maxTalkClient, ILogger logger) : BackgroundService { - private Gauge _energyDay = Metrics.CreateGauge("maxpower_energy_day", "The amount of energy created today in kWh", ["ip", "id"]); - private Gauge _energyMonth = Metrics.CreateGauge("maxpower_energy_month", "The amount of energy created this month in kWh", ["ip", "id"]); - private Gauge _energyYear = Metrics.CreateGauge("maxpower_energy_year", "The amount of energy created this year in kWh", ["ip", "id"]); - private Gauge _energyTotal = Metrics.CreateGauge("maxpower_energy_total", "The amount of energy created in total in kWh", ["ip", "id"]); + private Gauge _energyDay = Metrics.CreateGauge("maxpower_energy_day_kwh", "The amount of energy created today in kWh", ["ip", "id"]); + private Gauge _energyMonth = Metrics.CreateGauge("maxpower_energy_month_kwh", "The amount of energy created this month in kWh", ["ip", "id"]); + private Gauge _energyYear = Metrics.CreateGauge("maxpower_energy_year_kwh", "The amount of energy created this year in kWh", ["ip", "id"]); + private Gauge _energyTotal = Metrics.CreateGauge("maxpower_energy_total_kwh", "The amount of energy created in total in kWh", ["ip", "id"]); public MaxSettings MaxSettings { get; } = maxSettings ?? throw new ArgumentNullException(nameof(maxSettings)); public IEnumerable Inverters { get; } = inverters ?? throw new ArgumentNullException(nameof(inverters));