Skip to content

Commit

Permalink
Update metrics names
Browse files Browse the repository at this point in the history
  • Loading branch information
awaescher committed May 19, 2024
1 parent 408d058 commit c3ee4ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MaxPower/HostedServices/ExporterService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace MaxPower.HostedServices;

public class ExporterService(MaxSettings maxSettings, IEnumerable<InverterConfiguration> inverters, IMaxTalkClient maxTalkClient, ILogger<ExporterService> 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<InverterConfiguration> Inverters { get; } = inverters ?? throw new ArgumentNullException(nameof(inverters));
Expand Down

0 comments on commit c3ee4ce

Please sign in to comment.