Skip to content

Commit

Permalink
Make EnableProtobufNegotiation configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
yulong-db committed Oct 17, 2024
1 parent 69e7872 commit 3a7cc50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions static/metrics/instance/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ type GlobalConfig struct {
Prometheus config.GlobalConfig `yaml:",inline"`
RemoteWrite []*config.RemoteWriteConfig `yaml:"remote_write,omitempty"`

EnableProtobufNegotiation bool `yaml:"enable_protobuf_negotiation,omitempty"`

ExtraMetrics bool `yaml:"-"`
DisableKeepAlives bool `yaml:"-"`
IdleConnTimeout time.Duration `yaml:"-"`
Expand Down
5 changes: 3 additions & 2 deletions static/metrics/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,9 @@ func (i *Instance) initialize(ctx context.Context, reg prometheus.Registerer, cf
i.storage = storage.NewFanout(i.logger, i.wal, i.remoteStore)

opts := &scrape.Options{
ExtraMetrics: cfg.global.ExtraMetrics,
HTTPClientOptions: []config_util.HTTPClientOption{},
ExtraMetrics: cfg.global.ExtraMetrics,
HTTPClientOptions: []config_util.HTTPClientOption{},
EnableProtobufNegotiation: cfg.global.EnableProtobufNegotiation,
}

if cfg.global.DisableKeepAlives {
Expand Down

0 comments on commit 3a7cc50

Please sign in to comment.