Skip to content

Commit

Permalink
Merge pull request #132 from aws/fix-format
Browse files Browse the repository at this point in the history
In Version 2.51.0 Of Prometheus FmtText Was Made Lower Case
  • Loading branch information
sethAmazon authored Apr 23, 2024
2 parents 033ad14 + ae946c8 commit 63baeae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/serializers/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ func (s *Serializer) SerializeBatch(metrics []telegraf.Metric) ([]byte, error) {

var buf bytes.Buffer
for _, mf := range coll.GetProto() {
enc := expfmt.NewEncoder(&buf, expfmt.FmtText)
format := expfmt.Format(`text/plain; version=` + `0.0.4` + `; charset=utf-8`)
enc := expfmt.NewEncoder(&buf, format)
err := enc.Encode(mf)
if err != nil {
return nil, err
Expand Down

0 comments on commit 63baeae

Please sign in to comment.