Documentation
¶
Overview ¶
Package observe implements a type that combines statter, logger and tracer.
Example usage:
obsrv, err := observe.New(ctx, cliCmd, &observe.Options{})
if err != nil {
// Handle error.
return
}
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Observer ¶
type Observer struct {
Log *logger.Logger
Stats *statter.Statter
TraceProv trace.TracerProvider
// contains filtered or unexported fields
}
Observer contains observability primitives.
func New ¶
New returns an observer with the given observability primitives.
Example ¶
var (
ctx context.Context
cliCmd *cli.Command // Get this from your action
)
obsrv, err := observe.New(ctx, cliCmd, "my-service", &observe.Options{})
if err != nil {
// Handle error.
return
}
_ = obsrv
Click to show internal directories.
Click to hide internal directories.