metric

package
v0.0.0-...-a2c6c8b Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package metric ...

This package contains all the runtime metrics collected by the SDK This is used to collect the runtime statistics of the process and publish it to IA This runs in a separate go process based on time interval configured in config

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Op    string
	Id    string
	Type  int
	Value string
}

The Metric type has the information about the metrics collected like op - Type of Operation Id - Display ID of the metric in IA Type - Type of the metrics like counter,timepahse Value - Value of the metric

func CollectRuntimeMetrics

func CollectRuntimeMetrics() []Metric

CollectRuntimeMetrics is used to retrieve the runtime metrics of the process The following metrics are collected at present and this can be extended to collect more metrics heapObjects -- Cumulative count of heap objects allocation(Total Heap Allocated) heapObjectsFreed -- Cumulative count of heap object freed(Total Heap Free) allocation -- Bytes of allocated heap objects (Bytes In Use) totalAllocation -- Cumulative bytes allocated for heap objects (Bytes Total) goRoutines -- Represents the number of currently active goRoutines for the process(Routines Total)

func CollectStaticMetrics

func CollectStaticMetrics() []Metric

CollectStaticMetrics is used to retrieve the metrics of the process The following metrics are collected at only once processID -- Current ID of the running process version -- GO Version by the running process cpu -- Logical CPU count of the process HostName -- Name of the host the probe is running

Jump to

Keyboard shortcuts

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