Compare commits

...

2 Commits

2 changed files with 5 additions and 4 deletions

View File

@ -196,8 +196,8 @@ func (k *Kafka) NewWriter(topic string) (*kafka.Writer, error) {
Topic: topic, Topic: topic,
Balancer: &kafka.LeastBytes{}, Balancer: &kafka.LeastBytes{},
BatchSize: 2000, BatchSize: 2000,
Compression: kafka.Snappy, Compression: kafka.Lz4,
Logger: k.l, // Logger: k.l,
ErrorLogger: k.l, ErrorLogger: k.l,
} }

View File

@ -84,10 +84,11 @@ func RegisterMetric(registry prometheus.Registerer) {
Name: "build_info", Name: "build_info",
Help: "Build information", Help: "Build information",
}, },
[]string{"version"}, []string{"version", "build"},
) )
registry.MustRegister(buildInfo) registry.MustRegister(buildInfo)
buildInfo.WithLabelValues(Version()).Set(1) info := VersionInfo()
buildInfo.WithLabelValues(fmt.Sprintf("%s/%s", info.Version, info.GitRev), info.BuildTime).Set(1)
} }
var v string var v string