logmower-shipper/pkg/lines/metrics.go

24 lines
747 B
Go
Raw Normal View History

2022-11-09 16:07:28 +00:00
package lines
import (
"git.k-space.ee/k-space/logmower-shipper/pkg/globals"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
2022-11-09 19:13:36 +00:00
const promSubsystem = "record"
2022-11-09 16:07:28 +00:00
var (
promRecordDroppedTooLarge = promauto.NewCounterVec(prom.CounterOpts{
2022-11-09 19:13:36 +00:00
Namespace: globals.PrometheusPrefix, // Subsystem: promSubsystem,
Name: "dropped_lines", // "dropped",
Help: "Records dropped due to being too large",
2022-11-09 16:07:28 +00:00
}, []string{"filename"})
promRecordPrefixParsingErr = promauto.NewCounterVec(prom.CounterOpts{
2022-11-09 19:13:36 +00:00
Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
Name: "parsing_errors",
Help: "Errors while parsing log line prefixes",
2022-11-09 16:07:28 +00:00
}, []string{"filename"})
)