add metrics for service
This commit is contained in:
@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/go-gost/gost/pkg/config"
|
||||
"github.com/go-gost/gost/pkg/metadata"
|
||||
"github.com/go-gost/gost/pkg/metrics"
|
||||
metrics "github.com/go-gost/gost/pkg/metrics/service"
|
||||
"github.com/go-gost/gost/pkg/registry"
|
||||
)
|
||||
|
||||
@ -46,6 +46,12 @@ func buildConfigFromCmd(services, nodes stringList) (*config.Config, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if v := os.Getenv("GOST_LOGGING_LEVEL"); v != "" {
|
||||
cfg.Log = &config.LogConfig{
|
||||
Level: v,
|
||||
}
|
||||
}
|
||||
|
||||
var chain *config.ChainConfig
|
||||
if len(nodes) > 0 {
|
||||
chain = &config.ChainConfig{
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/go-gost/gost/pkg/config"
|
||||
"github.com/go-gost/gost/pkg/config/parsing"
|
||||
"github.com/go-gost/gost/pkg/logger"
|
||||
"github.com/go-gost/gost/pkg/metrics"
|
||||
metrics "github.com/go-gost/gost/pkg/metrics/service"
|
||||
"github.com/go-gost/gost/pkg/registry"
|
||||
"github.com/go-gost/gost/pkg/service"
|
||||
)
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/go-gost/gost/pkg/config"
|
||||
"github.com/go-gost/gost/pkg/logger"
|
||||
"github.com/go-gost/gost/pkg/metrics"
|
||||
metrics "github.com/go-gost/gost/pkg/metrics/service"
|
||||
)
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user