o11y

package
v0.0.0-...-cbd877e Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct{ BugsnagAPIKey, AppVersion, ReleaseStage, DatadogAgentAddr string }

Config represents the configuration necessary to set up Olly.

type Olly

type Olly struct {
	// We embed the Bugsnag notifier here so that calls to o.Wrap won't include
	// an intermediate stackframe in this wrapper.
	// This prevents awkward groupings, as the top in-project stakframe won't
	// consistently be this intermediate stackframe.
	*bugsnag.Notifier
	// Embedding the others just to get a clean interfaces in the app.
	*statsd.Client
	*logrus.Logger
}

Olly is easier to write and talk about than O11y.

func NewO11y

func NewO11y(cfg *Config) *Olly

NewO11y creates a new Olly type based on the given config.

func (*Olly) Log

func (o *Olly) Log(ctx context.Context, msg string, args ...interface{}) context.Context

Log logs the given message at INFO severity, including log metadata provided in the context, formatting the message if appropriate.

Jump to

Keyboard shortcuts

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