mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
grid2: remove strategyInstance since we have custom labels
This commit is contained in:
parent
0d47afd5fd
commit
668bf2d847
|
@ -36,7 +36,6 @@ func initMetrics(extendedLabels []string) {
|
|||
Help: "number of orders",
|
||||
},
|
||||
append([]string{
|
||||
"strategy_instance",
|
||||
"exchange", // exchange name
|
||||
"symbol", // symbol of the market
|
||||
}, extendedLabels...),
|
||||
|
@ -48,7 +47,6 @@ func initMetrics(extendedLabels []string) {
|
|||
Help: "order prices",
|
||||
},
|
||||
append([]string{
|
||||
"strategy_instance",
|
||||
"exchange", // exchange name
|
||||
"symbol", // symbol of the market
|
||||
"ith",
|
||||
|
@ -62,7 +60,6 @@ func initMetrics(extendedLabels []string) {
|
|||
Help: "realized grid profit",
|
||||
},
|
||||
append([]string{
|
||||
"strategy_instance",
|
||||
"exchange", // exchange name
|
||||
"symbol", // symbol of the market
|
||||
}, extendedLabels...),
|
||||
|
|
|
@ -112,10 +112,6 @@ type Strategy struct {
|
|||
|
||||
ResetPositionWhenStart bool `json:"resetPositionWhenStart"`
|
||||
|
||||
// StrategyInstance
|
||||
// an optional field for prometheus metrics
|
||||
StrategyInstance string `json:"strategyInstance"`
|
||||
|
||||
// PrometheusLabels will be used as the base prometheus labels
|
||||
PrometheusLabels prometheus.Labels `json:"prometheusLabels"`
|
||||
|
||||
|
@ -183,9 +179,6 @@ func (s *Strategy) Validate() error {
|
|||
}
|
||||
|
||||
func (s *Strategy) Defaults() error {
|
||||
if s.StrategyInstance == "" {
|
||||
s.StrategyInstance = "main"
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -1297,7 +1290,6 @@ func scanMissingPinPrices(orderBook *bbgo.ActiveOrderBook, pins []Pin) PriceMap
|
|||
|
||||
func (s *Strategy) newPrometheusLabels() prometheus.Labels {
|
||||
labels := prometheus.Labels{
|
||||
"strategy_instance": s.StrategyInstance,
|
||||
"exchange": s.session.Name,
|
||||
"symbol": s.Symbol,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user