Files
trufflehog/pkg/writers/buffer_writer/metrics.go
ahrav 40bbab8add [cleanup] - Extract buffer logic (#2409)
* extract the buffer logic into it's own package

* address comments
2024-02-15 11:40:34 -08:00

25 lines
774 B
Go

package bufferwriter
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/trufflesecurity/trufflehog/v3/pkg/common"
)
var (
totalWriteSize = promauto.NewCounter(prometheus.CounterOpts{
Namespace: common.MetricsNamespace,
Subsystem: common.MetricsSubsystem,
Name: "buffer_writer_total_write_size_bytes",
Help: "Total size of data written by the BufferWriter in bytes.",
})
totalWriteDuration = promauto.NewCounter(prometheus.CounterOpts{
Namespace: common.MetricsNamespace,
Subsystem: common.MetricsSubsystem,
Name: "buffer_writer_total_write_duration_microseconds",
Help: "Total duration of write operations by the BufferWriter in microseconds.",
})
)