metrics

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metrics provides a factory function that resolves to either a none, or an otel implementation of metrics code.

Package metrics provides implementation of metrics with otel exporter / gauges.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	FunctionExecutions       syncint64.Counter
	FailedFunctionExecutions syncint64.Counter
	FunctionTime             syncint64.Histogram
}

func ResolveMetrics

func ResolveMetrics(ctx context.Context, config options.MetricsConfig) (Metrics, error)

func SetupNoopMetrics

func SetupNoopMetrics() Metrics

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

func NewTimer

func NewTimer() Timer

NewTimer returns a Timer with the current time stored in it.

func (Timer) Observe

func (t Timer) Observe() int64

Jump to

Keyboard shortcuts

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