Skip to content

Commit

Permalink
Enable HTTP 2 again
Browse files Browse the repository at this point in the history
We are re-enabling HTTP 2 again. There has been a few bugfixes upstream
in go, and we have also enabled ReadIdleTimeout.

Signed-off-by: Julien Pivotto <[email protected]>
  • Loading branch information
roidelapluie committed Nov 9, 2021
1 parent 5b825e2 commit 1f7e42a
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/oklog/ulid v1.3.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.30.0
github.com/prometheus/common v0.31.0
github.com/prometheus/common/sigv4 v0.1.0
github.com/prometheus/exporter-toolkit v0.6.1
github.com/rs/cors v1.8.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9
github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug=
github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.31.0 h1:FTJdLTjtrh4dXlCjpzdZJXMnejSTL5F/nVQm5sNwD34=
github.com/prometheus/common v0.31.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=
github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
github.com/prometheus/exporter-toolkit v0.6.1 h1:Aqk75wQD92N9CqmTlZwjKwq6272nOGrWIbc8Z7+xQO0=
Expand Down
2 changes: 1 addition & 1 deletion notify/opsgenie/opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Notifier struct {

// New returns a new OpsGenie notifier.
func New(c *config.OpsGenieConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "opsgenie", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "opsgenie", httpOpts...)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion notify/pagerduty/pagerduty.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type Notifier struct {

// New returns a new PagerDuty notifier.
func New(c *config.PagerdutyConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pagerduty", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pagerduty", httpOpts...)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion notify/pushover/pushover.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Notifier struct {

// New returns a new Pushover notifier.
func New(c *config.PushoverConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pushover", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pushover", httpOpts...)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion notify/slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Notifier struct {

// New returns a new Slack notification handler.
func New(c *config.SlackConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "slack", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "slack", httpOpts...)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion notify/sns/sns.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Notifier struct {

// New returns a new SNS notification handler.
func New(c *config.SNSConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "sns", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "sns", httpOpts...)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion notify/victorops/victorops.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Notifier struct {

// New returns a new VictorOps notifier.
func New(c *config.VictorOpsConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "victorops", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "victorops", httpOpts...)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion notify/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Notifier struct {

// New returns a new Webhook.
func New(conf *config.WebhookConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "webhook", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "webhook", httpOpts...)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion notify/wechat/wechat.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type weChatResponse struct {

// New returns a new Wechat notifier.
func New(c *config.WechatConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) {
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "wechat", append(httpOpts, commoncfg.WithHTTP2Disabled())...)
client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "wechat", httpOpts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1f7e42a

Please sign in to comment.