aitelemetry

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIConfig

type AIConfig struct {
	AppName                      string
	AppVersion                   string
	BatchSize                    int
	BatchInterval                int
	DisableMetadataRefreshThread bool
	RefreshTimeout               int
	DebugMode                    bool
}

type Metric

type Metric struct {
	Name             string
	Value            float64
	CustomDimensions map[string]string
}

Application metrics structure

type Report

type Report struct {
	Message          string
	Context          string
	CustomDimensions map[string]string
}

Application trace/log structure

type TelemetryHandle

type TelemetryHandle interface {
	// TrackLog function sends report (trace) to appinsights resource. It overrides few of the existing columns with app information
	// and for rest it uses custom dimesion
	TrackLog(report Report)
	// TrackMetric function sends metric to appinsights resource. It overrides few of the existing columns with app information
	// and for rest it uses custom dimesion
	TrackMetric(metric Metric)
	// Close - should be called for each NewAITelemetry call. Will release resources acquired
	Close(timeout int)
}

Telemetry Interface to send metrics/Logs to appinsights

func NewAITelemetry

func NewAITelemetry(
	id string,
	aiConfig AIConfig,
) TelemetryHandle

NewAITelemetry creates telemetry handle with user specified appinsights id.

Jump to

Keyboard shortcuts

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