Documentation
¶
Overview ¶
Package observability owns Soro tracing, metrics, and HTTP instrumentation.
Index ¶
- Constants
- func NewLogger(settings LoggerConfig) (*slog.Logger, error)
- type Config
- type DatabaseHook
- type HTTPOptions
- type LoggerConfig
- type Metrics
- func (metrics *Metrics) RecordDatabase(ctx context.Context, operation, status string, duration time.Duration)
- func (metrics *Metrics) RecordHTTP(ctx context.Context, method string, status int, duration time.Duration)
- func (metrics *Metrics) RecordJob(ctx context.Context, kind, queue string, attempts int, duration time.Duration, ...)
- func (metrics *Metrics) RecordMail(ctx context.Context, transport string, duration time.Duration, err error)
- type Provider
- func (provider *Provider) DatabaseHook() *DatabaseHook
- func (provider *Provider) HTTPMiddleware(options HTTPOptions) func(http.Handler) http.Handler
- func (provider *Provider) Handler() http.Handler
- func (provider *Provider) Meter() metricapi.Meter
- func (provider *Provider) Metrics() *Metrics
- func (provider *Provider) Propagator() propagation.TextMapPropagator
- func (provider *Provider) Shutdown(ctx context.Context) error
- func (provider *Provider) Tracer() trace.Tracer
Constants ¶
View Source
const RedactedValue = "[REDACTED]"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type DatabaseHook ¶
type DatabaseHook struct {
// contains filtered or unexported fields
}
func (*DatabaseHook) AfterQuery ¶
func (hook *DatabaseHook) AfterQuery(ctx context.Context, event *bun.QueryEvent)
func (*DatabaseHook) BeforeQuery ¶
func (hook *DatabaseHook) BeforeQuery(ctx context.Context, event *bun.QueryEvent) context.Context
type HTTPOptions ¶
type LoggerConfig ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (*Metrics) RecordDatabase ¶
func (*Metrics) RecordHTTP ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) DatabaseHook ¶
func (provider *Provider) DatabaseHook() *DatabaseHook
func (*Provider) HTTPMiddleware ¶
func (*Provider) Propagator ¶
func (provider *Provider) Propagator() propagation.TextMapPropagator
Click to show internal directories.
Click to hide internal directories.