telemetry

package
v0.58.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorsCounter = "errors"
)

Variables

This section is empty.

Functions

func Count

func Count(ctx context.Context, opts *options.TerragruntOptions, name string, value int64)

Count - add to counter provided value

func InitTelemetry

func InitTelemetry(ctx context.Context, opts *TelemetryOptions) error

InitTelemetry - initialize the telemetry provider.

func ShutdownTelemetry

func ShutdownTelemetry(ctx context.Context) error

ShutdownTelemetry - shutdown the telemetry provider.

func Telemetry

func Telemetry(ctx context.Context, opts *options.TerragruntOptions, name string, attrs map[string]interface{}, fn func(childCtx context.Context) error) error

Telemetry - collect telemetry from function execution - metrics and traces.

func Time

func Time(ctx context.Context, opts *options.TerragruntOptions, name string, attrs map[string]interface{}, fn func(childCtx context.Context) error) error

Time - collect time for function execution

func Trace

func Trace(ctx context.Context, opts *options.TerragruntOptions, name string, attrs map[string]interface{}, fn func(childCtx context.Context) error) error

Trace - collect traces for method execution

Types

type ErrorMissingEnvVariable

type ErrorMissingEnvVariable struct {
	Vars []string
}

ErrorMissingEnvVariable error for missing environment variable.

func (*ErrorMissingEnvVariable) Error

func (e *ErrorMissingEnvVariable) Error() string

type TelemetryOptions

type TelemetryOptions struct {
	Vars       map[string]string
	AppName    string
	AppVersion string
	Writer     io.Writer
	ErrWriter  io.Writer
}

TelemetryOptions - options for telemetry provider.

Jump to

Keyboard shortcuts

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