appinsights

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "appinsights"

Type should match the package name

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// InstrumentationKey is a GUID that identifies an app insights instance
	InstrumentationKey string `json:"instrumentation_key"`

	// TestLocation identifies the test location sent
	// in Application Insights trackAvailability() events
	TestLocation string `json:"test_location,omitempty"`

	// Tags will be applied to all telemetry items and
	// visible in the customDimensions field when viewing the
	// submitted data
	Tags map[string]string `json:"tags,omitempty"`

	// MaxRetries specifies the number of retries before returning error
	// from close().  To enable retries, both RetryInterval and MaxRetries
	// must be greater than 0.  Default is 0 (disabled).
	MaxRetries int `json:"max_retries,omitempty"`

	// RetryInterval specifies the time between retries in seconds.  To enable retries,
	// both RetryInterval and MaxRetries must
	// be greater than 0.  Default is 0 (disabled).
	RetryInterval int `json:"retry_interval,omitempty"`

	// Timeout specifies the number of seconds to wait for telemetry submission
	// before returning error from close() if retries are disabled.  If omitted or
	// set to 0, timeout will be 2 seconds.  If retries are enabled, this setting
	// is ignored.
	Timeout int `json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

Storage will send results to Azure Application Insights

func New

func New(config json.RawMessage) (Storage, error)

New creates a new Storage instance based on json config

func (Storage) Store

func (c Storage) Store(results []types.Result) error

Store takes a list of Checker results and sends them to the configured Application Insights instance.

func (Storage) Type

func (Storage) Type() string

Type returns the logger package name

Jump to

Keyboard shortcuts

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