metrics

package
v0.0.0-...-075157f Latest Latest
Warning

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

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

Documentation

Overview

Package metrics contains utilities for exporting metrics.

Index

Constants

This section is empty.

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.

Jump to

Keyboard shortcuts

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