metric

package
v1.0.0-...-47f3d97 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableDebugFinalizer

func EnableDebugFinalizer()

func New

func New(
	name string,
	tags map[string]string,
	fields map[string]interface{},
	tm time.Time,
	tp ...telegraf.ValueType,
) (telegraf.Metric, error)

func WithGroupTracking

func WithGroupTracking(metric []telegraf.Metric, fn NotifyFunc) ([]telegraf.Metric, telegraf.TrackingID)

WithBatchTracking adds tracking to the metrics and registers the notify function to be called when processing is complete.

func WithTracking

func WithTracking(metric telegraf.Metric, fn NotifyFunc) (telegraf.Metric, telegraf.TrackingID)

WithTracking adds tracking to the metric and registers the notify function to be called when processing is complete.

Types

type Builder

type Builder struct {
	TimeFunc
	TimePrecision time.Duration
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *Builder

func (Builder) Accept

func (m Builder) Accept()

func (*Builder) AddField

func (b *Builder) AddField(key string, value interface{})

func (Builder) AddPrefix

func (m Builder) AddPrefix(prefix string)

func (Builder) AddSuffix

func (m Builder) AddSuffix(suffix string)

func (*Builder) AddTag

func (b *Builder) AddTag(key string, value string)

func (Builder) Copy

func (m Builder) Copy() telegraf.Metric

func (Builder) Drop

func (m Builder) Drop()

func (Builder) FieldList

func (m Builder) FieldList() []*telegraf.Field

func (Builder) Fields

func (m Builder) Fields() map[string]interface{}

func (Builder) GetField

func (m Builder) GetField(key string) (interface{}, bool)

func (Builder) GetTag

func (m Builder) GetTag(key string) (string, bool)

func (Builder) HasField

func (m Builder) HasField(key string) bool

func (Builder) HasTag

func (m Builder) HasTag(key string) bool

func (Builder) HashID

func (m Builder) HashID() uint64

func (Builder) IsAggregate

func (m Builder) IsAggregate() bool

func (*Builder) Metric

func (b *Builder) Metric() (telegraf.Metric, error)

func (Builder) Name

func (m Builder) Name() string

func (Builder) Reject

func (m Builder) Reject()

func (Builder) RemoveField

func (m Builder) RemoveField(key string)

func (Builder) RemoveTag

func (m Builder) RemoveTag(key string)

func (*Builder) Reset

func (b *Builder) Reset()

func (Builder) SetAggregate

func (m Builder) SetAggregate(b bool)

func (*Builder) SetName

func (b *Builder) SetName(name string)

func (*Builder) SetTime

func (b *Builder) SetTime(tm time.Time)

func (Builder) String

func (m Builder) String() string

func (Builder) TagList

func (m Builder) TagList() []*telegraf.Tag

func (Builder) Tags

func (m Builder) Tags() map[string]string

func (Builder) Time

func (m Builder) Time() time.Time

func (Builder) Type

func (m Builder) Type() telegraf.ValueType

type NotifyFunc

type NotifyFunc = func(track telegraf.DeliveryInfo)

NotifyFunc is called when a tracking metric is done being processed with the tracking information.

type TimeFunc

type TimeFunc func() time.Time

Jump to

Keyboard shortcuts

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