Fix build and code structure improvements. New but essential UI functionality. CI improvements. Documentation improvements. AI module improvements.
This commit is contained in:
@@ -11,8 +11,8 @@ public class LedgerMetricsTests
|
||||
[Fact]
|
||||
public void RecordProjectionApply_emits_histogram_and_counter_with_tags()
|
||||
{
|
||||
var histogramValues = new List<Measurement<double>>();
|
||||
var counterValues = new List<Measurement<long>>();
|
||||
var histogramValues = new List<(double Value, KeyValuePair<string, object?>[] Tags)>();
|
||||
var counterValues = new List<(long Value, KeyValuePair<string, object?>[] Tags)>();
|
||||
|
||||
using var listener = new MeterListener
|
||||
{
|
||||
@@ -25,19 +25,19 @@ public class LedgerMetricsTests
|
||||
}
|
||||
};
|
||||
|
||||
listener.SetMeasurementEventCallback<double>((instrument, measurement, _) =>
|
||||
listener.SetMeasurementEventCallback<double>((instrument, measurement, tags, state) =>
|
||||
{
|
||||
if (instrument.Name is "ledger_projection_apply_seconds" or "ledger_projection_lag_seconds")
|
||||
{
|
||||
histogramValues.Add(measurement);
|
||||
histogramValues.Add((measurement, tags.ToArray()));
|
||||
}
|
||||
});
|
||||
|
||||
listener.SetMeasurementEventCallback<long>((instrument, measurement, _) =>
|
||||
listener.SetMeasurementEventCallback<long>((instrument, measurement, tags, state) =>
|
||||
{
|
||||
if (instrument.Name == "ledger_projection_events_total")
|
||||
{
|
||||
counterValues.Add(measurement);
|
||||
counterValues.Add((measurement, tags.ToArray()));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user