Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/alert/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import (
"github.com/go-kit/kit/log/level"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"

"github.com/prometheus/common/version"
"github.com/prometheus/prometheus/pkg/labels"

"github.com/thanos-io/thanos/pkg/runutil"
)

Expand All @@ -27,6 +28,8 @@ const (
contentTypeJSON = "application/json"
)

var userAgent = fmt.Sprintf("Thanos/%s", version.Version)

// Alert is a generic representation of an alert in the Prometheus eco-system.
type Alert struct {
// Label value pairs for purpose of aggregation, matching, and disposition
Expand Down Expand Up @@ -369,6 +372,7 @@ func (s *Sender) sendOne(ctx context.Context, url string, b []byte) error {
}
req = req.WithContext(ctx)
req.Header.Set("Content-Type", contentTypeJSON)
req.Header.Set("User-Agent", userAgent)

resp, err := s.doReq(req)
if err != nil {
Expand Down