Noel McGrath
04/08/2024, 8:14 PMSrikanth Chekuri
04/09/2024, 3:54 AMNoel McGrath
04/09/2024, 7:33 AMNoel McGrath
04/09/2024, 7:33 AMSrikanth Chekuri
04/09/2024, 9:19 AMNoel McGrath
04/09/2024, 10:38 AMSrikanth Chekuri
04/09/2024, 12:06 PMNoel McGrath
04/09/2024, 1:06 PMSrikanth Chekuri
04/09/2024, 1:09 PMNoel McGrath
04/09/2024, 8:26 PMMeter.CreateObservableGauge(
"bins.infiletest",
() => value,
"int",
"bins in file",
new List<KeyValuePair<string, object>> { new("bin.provider", BINProvider) });
Srikanth Chekuri
04/10/2024, 5:06 AMNoel McGrath
04/10/2024, 6:50 AMSrikanth Chekuri
04/10/2024, 7:00 AMbin
what options show up?Noel McGrath
04/10/2024, 8:01 AMSrikanth Chekuri
04/10/2024, 8:15 AMSrikanth Chekuri
04/10/2024, 8:22 AMBINProvider
? Is it a string? I think that's where the issue is.Noel McGrath
04/10/2024, 8:31 AMSrikanth Chekuri
04/10/2024, 8:39 AMNoel McGrath
04/10/2024, 8:47 AMpublic static void AddBINSInFileGauge(int BINProviderId, int value)
{
Meter.CreateObservableGauge(
"bins.infiletest",
() => value,
"int",
"bins in file",
new List<KeyValuePair<string, object>> { new("bin.providerid", BINProviderId) });
}
Srikanth Chekuri
04/10/2024, 8:50 AMNoel McGrath
04/11/2024, 11:01 AMpublic ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit = null, string? description = null) where T : struct =>
new ObservableGauge<T>(this, name, observeValues, unit, description, tags: null);
Example usage:
public static void AddBINFileGauge(string BINProviderName, int value) => Meter.CreateObservableGauge(
"ccs.bin.file",
() => new List<Measurement<long>>()
{
new(value, KeyValuePair.Create<string, object>("ccs.bin.providername", BINProviderName)),
});
And the tags are now showing up. So for whatever reason previous function seems to ignore tags even though I had then setSrikanth Chekuri
04/11/2024, 11:26 AM