observability

package
v0.0.0-...-9518a5e Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Providers represents this package's offering to the dependency manager.
	Providers = wire.NewSet(
		wire.FieldsOf(new(*Config),
			"Metrics",
			"Tracing",
		),
	)
)

Functions

func AcknowledgeError

func AcknowledgeError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, descriptionArgs ...interface{})

AcknowledgeError standardizes our error handling by logging and tracing consistently.

func NoteEvent

func NoteEvent(logger logging.Logger, span tracing.Span, descriptionFmt string, descriptionArgs ...interface{})

NoteEvent standardizes our logging and tracing notifications.

func PrepareError

func PrepareError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, descriptionArgs ...interface{}) error

PrepareError standardizes our error handling by logging, tracing, and formatting an error consistently.

Types

type Config

type Config struct {
	Tracing tracing.Config `json:"tracing" mapstructure:"tracing" toml:"tracing,omitempty"`
	Metrics metrics.Config `json:"metrics" mapstructure:"metrics" toml:"metrics,omitempty"`
	// contains filtered or unexported fields
}

Config contains settings about how we report our metrics.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

Directories

Path Synopsis
Package metrics provides metrics collection functions and structs
Package metrics provides metrics collection functions and structs
mock
Package mock provides mockable implementations of every interface defined in the outer metrics package.
Package mock provides mockable implementations of every interface defined in the outer metrics package.
Package tracing provides common functions for attaching values to trace spans
Package tracing provides common functions for attaching values to trace spans

Jump to

Keyboard shortcuts

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