Skip to content

Commit

Permalink
incorrect dataLen
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte committed Dec 17, 2024
1 parent 10a85c1 commit 9644bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/alertmanager/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (s Service) configure(ctx context.Context, alertmanagerConfigContent []byte
if err != nil {
return errors.WithStack(fmt.Errorf("alertmanager: failed to marshal yaml: %w", err))
}
dateLen := len(data)
dataLen := len(data)

url := s.alertmanagerURL + alertmanagerAPIPath
logger.WithValues("url", url, "data_size", dataLen, "config_size", len(alertmanagerConfigContent), "templates_count", len(templates)).Info("Alertmanager: sending configuration")
Expand All @@ -117,7 +117,7 @@ func (s Service) configure(ctx context.Context, alertmanagerConfigContent []byte
return errors.WithStack(fmt.Errorf("alertmanager: failed to create request: %w", err))
}
req.Header.Set(common.OrgIDHeader, tenantID)
req.ContentLength = int64(dateLen)
req.ContentLength = int64(dataLen)

resp, err := http.DefaultClient.Do(req)
if err != nil {
Expand Down

0 comments on commit 9644bbf

Please sign in to comment.