Prometheus: use correct timestamp resolution (#2110)

The spec says it must be milliseconds.
This commit is contained in:
K900
2025-12-16 23:08:09 +01:00
committed by GitHub
parent 2c14ac128a
commit df244186fb
+1 -1
View File
@@ -683,7 +683,7 @@ public class HttpServer
else
{
// Outputs prometheus tag with labels, value, and timestamp
responseStr += $"{tagLine} {(val.Value * factor).ToString(CultureInfo.InvariantCulture)} {((DateTimeOffset)val.Time).ToUnixTimeSeconds()}\n";
responseStr += $"{tagLine} {(val.Value * factor).ToString(CultureInfo.InvariantCulture)} {((DateTimeOffset)val.Time).ToUnixTimeMilliseconds()}\n";
}
}
}