metrics

package
Version: v1.7.4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMetricNamespace is the prefix of metric name.
	DefaultMetricNamespace = "dapr"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter interface {
	// Init initializes metrics exporter
	Init() error
	// Options returns Exporter options
	Options() *Options
}

Exporter is the interface for metrics exporters.

func NewExporter

func NewExporter(namespace string) Exporter

NewExporter creates new MetricsExporter instance.

type Options

type Options struct {
	// OutputLevel is the level of logging
	MetricsEnabled bool

	Port string
}

Options defines the sets of options for Dapr logging.

func (*Options) AttachCmdFlag added in v0.11.0

func (o *Options) AttachCmdFlag(
	stringVar func(p *string, name string, value string, usage string))

AttachCmdFlag attaches single metrics option to command flags.

func (*Options) AttachCmdFlags

func (o *Options) AttachCmdFlags(
	stringVar func(p *string, name string, value string, usage string),
	boolVar func(p *bool, name string, value bool, usage string))

AttachCmdFlags attaches metrics options to command flags.

func (*Options) MetricsPort

func (o *Options) MetricsPort() uint64

MetricsPort gets metrics port.

Jump to

Keyboard shortcuts

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