package file

import (
	"git.k-space.ee/k-space/logmower-shipper/pkg/globals"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promauto"
)

const promSubsystem = "file"

var (
	promFileInitialSeekSkipped = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: globals.PrometheusPrefix, // Subsystem: promSubsystem,
		Name:      "skipped_bytes",
		Help:      "Bytes skipped in file after discovering",
	}, []string{"filename"})
	promFileCatchupDone = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
		Name: "catchupped",
		Help: "(0 or) 1 if initial backlog has been sent; (total <= watcher_file_count)",
	}, []string{"filename"})
	promFileErr = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
		Name: "errors_count",
		Help: "Errors while reading file",
	}, []string{"filename"})
	promFileLineSize = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: globals.PrometheusPrefix, Subsystem: promSubsystem,
		Name:    "line_size_bytes",
		Help:    "Log line size in bytes",
		Buckets: []float64{80, 160, 320, 640, 1280},
	}, []string{"filename"})
)
