observability

package
v0.0.0-...-ff1ddd2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 20 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 {
	LogFormat string
	LogOutput io.Writer
	LogLevel  slog.Level
}

func (*Config) SetFlags

func (c *Config) SetFlags(f *flag.FlagSet)

type O

type O struct {
	N string
	L *slog.Logger
	H slog.Handler
	T trace.Tracer
	M metric.Meter
}

func New

func New(c *Config) *O

func (*O) Component

func (o *O) Component(name string) *O

func (*O) Err

func (o *O) Err(ctx context.Context, msg string, err error, attrs ...slog.Attr) error

func (*O) HTTPErr

func (o *O) HTTPErr(ctx context.Context, msg string, err error, rw http.ResponseWriter, code int, attrs ...slog.Attr)

Jump to

Keyboard shortcuts

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