Prometheus Configuration

prometheus Configuration

Config Prometheus configuration, we will start a prometheus port in the process. This configuration has already deprecated after version v1.4.3,please use https://github.com/zeromicro/go-zero/blob/master/internal/devserver/config.go instead, for details please see Basic Service Configuration

Definition of parameters

  1. // A Config is a prometheus config.
  2. type Config struct {
  3. Host string `json:",optional"`
  4. Port int `json:",default=9101"`
  5. Path string `json:",default=/metrics"`
  6. }
ParamsDataTypeDefault valueNote
HoststringListening address
Portint9101Listening Port
PathstringThe path to listen