metrics

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package metrics contains utilities for exporting metrics.

Index

Constants

View Source
const MetricRoot = "en-server/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter interface {
	WriteBool(name string, value bool)
	WriteInt(name string, cumulative bool, value int)
	WriteInt64(name string, cumulative bool, value int64)
	WriteIntDistribution(name string, cumulative bool, values []int)
	WriteFloat64(name string, cumulative bool, value float64)
	WriteFloat64Distribution(name string, cumulative bool, values []float64)
}

Exporter defines a generic metric exporter interface used in this application.

func NewLogsBasedExporter

func NewLogsBasedExporter(log *zap.SugaredLogger) Exporter

NewLogsBasedExporter creates a new logs based importer from a logger.

func NewLogsBasedFromContext

func NewLogsBasedFromContext(ctx context.Context) Exporter

NewLogsBasedFromContext creates a logs based metrics exporter.

type ExporterFromContext

type ExporterFromContext func(context.Context) Exporter

ExporterFromContext defines a function to create a new exporter based on the current context.

Directories

Path Synopsis
Package cleanup contains OpenCensus metrics and views for cleanup operations
Package cleanup contains OpenCensus metrics and views for cleanup operations
Package export contains OpenCensus metrics and views for export operations
Package export contains OpenCensus metrics and views for export operations
Package federationin contains OpenCensus metrics and views for federationin operations
Package federationin contains OpenCensus metrics and views for federationin operations
Package federationout contains OpenCensus metrics and views for federationout operations
Package federationout contains OpenCensus metrics and views for federationout operations
Package metricsware provides a middleware for recording metrics of different kinds
Package metricsware provides a middleware for recording metrics of different kinds
Package publish contains OpenCensus metrics and views for publish operations
Package publish contains OpenCensus metrics and views for publish operations
Package rotate contains OpenCensus metrics and views for rotate operations
Package rotate contains OpenCensus metrics and views for rotate operations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL