Documentation
¶
Index ¶
- Constants
- Variables
- func CreateAndRegisterExporters() error
- type MetricCounter
- func (c *MetricCounter) Commit(ctx context.Context)
- func (c *MetricCounter) WithAttribute(key string, value interface{}) *MetricCounter
- func (c *MetricCounter) WithEntryFields(e log.Entry) *MetricCounter
- func (c *MetricCounter) WithError(err error) *MetricCounter
- func (c *MetricCounter) WithValue(value int64) *MetricCounter
Constants ¶
View Source
const (
// ServiceName is the name of the service for the purposes of
ServiceName = "gort-controller"
)
Variables ¶
View Source
var ( PrometheusExporter *prometheus.Exporter MeterProvider metric.MeterProvider )
Functions ¶
func CreateAndRegisterExporters ¶
func CreateAndRegisterExporters() error
Types ¶
type MetricCounter ¶
type MetricCounter struct {
// contains filtered or unexported fields
}
func TotalRequests ¶
func TotalRequests() *MetricCounter
TotalRequestCount increments the unauthorized requests counter.
func UnauthorizedRequests ¶
func UnauthorizedRequests() *MetricCounter
UnauthorizedRequestCount increments the total requests counter.
func (*MetricCounter) Commit ¶
func (c *MetricCounter) Commit(ctx context.Context)
func (*MetricCounter) WithAttribute ¶
func (c *MetricCounter) WithAttribute(key string, value interface{}) *MetricCounter
func (*MetricCounter) WithEntryFields ¶
func (c *MetricCounter) WithEntryFields(e log.Entry) *MetricCounter
func (*MetricCounter) WithError ¶
func (c *MetricCounter) WithError(err error) *MetricCounter
func (*MetricCounter) WithValue ¶
func (c *MetricCounter) WithValue(value int64) *MetricCounter
Click to show internal directories.
Click to hide internal directories.