Back to

package telemetry

Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module:


Package telemetry controls the telemetry settings to be used in the collector.


func Flags

func Flags(flags *flag.FlagSet)

func GetAddInstanceID

func GetAddInstanceID() bool

func GetMetricsAddr

func GetMetricsAddr() string

func GetMetricsAddrDefault

func GetMetricsAddrDefault() string

GetMetricsAddrDefault returns the default metrics bind address and port depending on the current build type.

func GetMetricsPrefix

func GetMetricsPrefix() string

func UseLegacyMetrics

func UseLegacyMetrics() bool

func UseNewMetrics

func UseNewMetrics() bool

type Level

type Level int8

Level of telemetry data to be generated.

const (

	// Telemetry levels
	// None indicates that no telemetry data should be collected.
	None Level = iota - 1
	// Basic is the default and covers the basics of the service telemetry.
	// Normal adds some other indicators on top of basic.
	// Detailed adds dimensions and views to the previous levels.

func GetLevel

func GetLevel() (Level, error)

GetLevel returns the Level represented by the string. The parsing is case-insensitive and it returns error if the string value is unknown.

type ProcessMetricsViews

type ProcessMetricsViews struct {
	// contains filtered or unexported fields

ProcessMetricsViews is a struct that contains views related to process metrics (cpu, mem, etc)

func NewProcessMetricsViews

func NewProcessMetricsViews(ballastSizeBytes uint64) *ProcessMetricsViews

NewProcessMetricsViews creates a new set of ProcessMetrics (mem, cpu) that can be used to measure basic information about this process.

func (*ProcessMetricsViews) StartCollection

func (pmv *ProcessMetricsViews) StartCollection()

StartCollection starts a ticker'd goroutine that will update the PMV measurements every 5 seconds

func (*ProcessMetricsViews) StopCollection

func (pmv *ProcessMetricsViews) StopCollection()

StopCollection stops the collection of the process metric information

func (*ProcessMetricsViews) Views

func (pmv *ProcessMetricsViews) Views() []*view.View

Views returns the views internal to the PMV

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier