Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMetricsAddInInitContext = common.NewInitContextError("Adding to metrics in the init context is not supported")

    ErrMetricsAddInInitContext is error returned when adding to metric is done in the init context

    Functions

    This section is empty.

    Types

    type Metric

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

    func (Metric) Add

    func (m Metric) Add(ctx context.Context, v goja.Value, addTags ...map[string]string) (bool, error)

    type Metrics

    type Metrics struct{}

    func New

    func New() *Metrics

    func (*Metrics) XCounter

    func (*Metrics) XCounter(ctx *context.Context, name string, isTime ...bool) (interface{}, error)

    func (*Metrics) XGauge

    func (*Metrics) XGauge(ctx *context.Context, name string, isTime ...bool) (interface{}, error)

    func (*Metrics) XRate

    func (*Metrics) XRate(ctx *context.Context, name string, isTime ...bool) (interface{}, error)

    func (*Metrics) XTrend

    func (*Metrics) XTrend(ctx *context.Context, name string, isTime ...bool) (interface{}, error)

    Source Files