Documentation ¶
Index ¶
- type Telemetry
- func (t *Telemetry) CreateHistogram(name string, start float64, width float64, numberOfBuckets int) (histogram prometheus.Histogram)
- func (t *Telemetry) LogDuration(durationInSecs float64)
- func (t *Telemetry) LogError(message string, err error)
- func (t *Telemetry) LogErrorByInstance(message string, err error, instance string)
- func (t *Telemetry) LogInfo(typeInfo string, message string)
- func (t *Telemetry) LogInfoByInstance(typeInfo string, message string, instance string)
- func (t *Telemetry) LogTrace(typeTrace string, message string)
- func (t *Telemetry) LogTraceByInstance(typeTrace string, message string, instance string)
- func (t *Telemetry) LogWarning(typeWarning string, message string)
- func (t *Telemetry) LogWarningByInstance(typeWarning string, message string, instance string)
- type TelemetryClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Telemetry ¶
type Telemetry struct { NamespaceName string SubsystemName string ComponentName string Logger logr.Logger }
Telemetry contains data for the TelemetryClient
func InitializeTelemetryDefault ¶
InitializeTelemetryDefault initializes a TelemetryFactory client
func (*Telemetry) CreateHistogram ¶
func (t *Telemetry) CreateHistogram(name string, start float64, width float64, numberOfBuckets int) (histogram prometheus.Histogram)
CreateHistogram creates a histogram, start = what value the historgram starts at, width = how wide are the buckets, numberOfBuckets = the number of buckets in the histogram
func (*Telemetry) LogDuration ¶
LogDuration logs the duration of an operation in seconds
func (*Telemetry) LogErrorByInstance ¶
LogErrorByInstance logs an error
func (*Telemetry) LogInfoByInstance ¶
LogInfoByInstance logs an informational message
func (*Telemetry) LogTrace ¶
LogTrace logs a trace message, it does not send telemetry to Prometheus
func (*Telemetry) LogTraceByInstance ¶
LogTraceByInstance logs a trace
func (*Telemetry) LogWarning ¶
LogWarning logs a warning
type TelemetryClient ¶
type TelemetryClient interface { LogTrace(typeTrace string, message string) LogInfo(typeInfo string, message string) LogWarning(typeWarning string, message string) LogError(message string, err error) LogDuration(duration float64) LogTraceByInstance(typeTrace string, message string, instance string) LogInfoByInstance(typeInfo string, message string, instance string) LogWarningByInstance(typeWarning string, message string, instance string) LogErrorByInstance(message string, err error, instance string) CreateHistogram(name string, start float64, width float64, numberOfBuckets int) (histogram prometheus.Histogram) }
TelemetryClient contains the functions for Telemetry
Click to show internal directories.
Click to hide internal directories.