github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/daemon/logger/metrics.go (about)

     1  package logger // import "github.com/docker/docker/daemon/logger"
     2  
     3  import (
     4  	metrics "github.com/docker/go-metrics"
     5  )
     6  
     7  var (
     8  	logWritesFailedCount metrics.Counter
     9  	logReadsFailedCount  metrics.Counter
    10  	totalPartialLogs     metrics.Counter
    11  )
    12  
    13  func init() {
    14  	loggerMetrics := metrics.NewNamespace("logger", "", nil)
    15  
    16  	logWritesFailedCount = loggerMetrics.NewCounter("log_write_operations_failed", "Number of log write operations that failed")
    17  	logReadsFailedCount = loggerMetrics.NewCounter("log_read_operations_failed", "Number of log reads from container stdio that failed")
    18  	totalPartialLogs = loggerMetrics.NewCounter("log_entries_size_greater_than_buffer", "Number of log entries which are larger than the log buffer")
    19  
    20  	metrics.Register(loggerMetrics)
    21  }