types: fix missing labels

This commit is contained in:
c9s 2024-08-23 19:59:56 +08:00
parent 9f510da78b
commit 40a0585187
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -665,6 +665,7 @@ func (p *Position) updateMetrics() {
labels := prometheus.Labels{
"strategy_id": p.StrategyInstanceID,
"strategy_type": p.Strategy,
"symbol": p.Symbol,
}
positionAverageCostMetrics.With(labels).Set(p.AverageCost.Float64())
positionBaseQuantityMetrics.With(labels).Set(p.Base.Float64())