Versions in this module Expand all Collapse all v12 v12.0.0 Aug 20, 2026 Changes in this version + func AcknowledgeError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, ...) + func ObserveValues(values map[string]any, span tracing.Span, logger logging.Logger) logging.Logger + func PrepareAndLogError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, ...) error + func PrepareAndLogGRPCStatus(err error, logger logging.Logger, span tracing.Span, code codes.Code, ...) error + func PrepareError(err error, span tracing.Span, descriptionFmt string, descriptionArgs ...any) error + func RegisterO11yConfigs(i do.Injector) + type BeginOption func(Operation) + func WithLogValue(key string, value any) BeginOption + func WithSpanValue(key string, value any) BeginOption + func WithValue(key string, value any) BeginOption + func WithValues(values map[string]any) BeginOption + type Config struct + Logging loggingcfg.Config + Metrics metricscfg.Config + Profiling profilingcfg.Config + Tracing tracingcfg.Config + func (cfg *Config) NewPillars(ctx context.Context) (*Pillars, error) + func (cfg *Config) ValidateWithContext(ctx context.Context) error + type Matcher struct + func ObservedKey(key string) Matcher + func ObservedKeyFunc(key string, pred func(value any) bool) Matcher + func ObservedKeyValue(key string, value any) Matcher + func ObservedValue(value any) Matcher + func (m Matcher) OnLog() Matcher + func (m Matcher) OnSpan() Matcher + type Observation struct + Key string + Pillar Pillar + Seq int + Value any + type Observer interface + Begin func(ctx context.Context, opts ...BeginOption) (context.Context, Operation) + BeginCustom func(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, Operation) + Logger func() logging.Logger + Tracer func() tracing.Tracer + func NewObserver(name string, logger logging.Logger, tracerProvider tracing.Provider) Observer + func NewObserverForTest(name string) Observer + func NewObserverWithValues(name string, logger logging.Logger, tracerProvider tracing.Provider, ...) Observer + type Operation interface + Acknowledge func(err error, descriptionFmt string, descriptionArgs ...any) + End func() + Error func(err error, descriptionFmt string, descriptionArgs ...any) error + GRPCStatus func(err error, code codes.Code, descriptionFmt string, descriptionArgs ...any) error + LogOnly func(key string, value any) Operation + Logger func() logging.Logger + Set func(key string, value any) Operation + SetValues func(values map[string]any) Operation + Span func() tracing.Span + SpanOnly func(key string, value any) Operation + Time func(ctx context.Context, c clock.Clock, hist metrics.Float64Histogram, ...) func() + type Pillar uint8 + const PillarBoth + const PillarLog + const PillarSpan + type Pillars struct + Logger logging.Logger + MetricsProvider metrics.Provider + Profiler profiling.Provider + TracerProvider tracing.Provider + func InvokePillars(i do.Injector) (*Pillars, error) + func (p *Pillars) Deps() (logger logging.Logger, tracerProvider tracing.Provider, ...) + func (p *Pillars) Shutdown(ctx context.Context) error + type RecordingObserver struct + Operations []*RecordingOperation + func NewRecordingObserver() *RecordingObserver + func NewRecordingObserverWithValues(values map[string]any) *RecordingObserver + func (o *RecordingObserver) Begin(ctx context.Context, opts ...BeginOption) (context.Context, Operation) + func (o *RecordingObserver) BeginCustom(ctx context.Context, _ string, _ ...trace.SpanStartOption) (context.Context, Operation) + func (o *RecordingObserver) Logger() logging.Logger + func (o *RecordingObserver) ObservedInOrder(t TestingT, matchers ...Matcher) + func (o *RecordingObserver) ObservedOperationWithData(t TestingT, data map[string]any) *RecordingOperation + func (o *RecordingObserver) ObservedOperationWithKeys(t TestingT, keys ...string) *RecordingOperation + func (o *RecordingObserver) ObservedOperationWithValues(t TestingT, values ...any) *RecordingOperation + func (o *RecordingObserver) Stream() []Observation + func (o *RecordingObserver) Tracer() tracing.Tracer + type RecordingOperation struct + Ended bool + Errors []error + LogValues map[string]any + Observations []Observation + SpanValues map[string]any + Values map[string]any + func (op *RecordingOperation) Acknowledge(err error, _ string, _ ...any) + func (op *RecordingOperation) End() + func (op *RecordingOperation) Error(err error, descriptionFmt string, descriptionArgs ...any) error + func (op *RecordingOperation) GRPCStatus(err error, code codes.Code, descriptionFmt string, descriptionArgs ...any) error + func (op *RecordingOperation) LogOnly(key string, value any) Operation + func (op *RecordingOperation) Logger() logging.Logger + func (op *RecordingOperation) Observed(t TestingT, matchers ...Matcher) + func (op *RecordingOperation) ObservedInOrder(t TestingT, matchers ...Matcher) + func (op *RecordingOperation) Set(key string, value any) Operation + func (op *RecordingOperation) SetValues(values map[string]any) Operation + func (op *RecordingOperation) Span() tracing.Span + func (op *RecordingOperation) SpanOnly(key string, value any) Operation + func (op *RecordingOperation) Time(ctx context.Context, c clock.Clock, hist metrics.Float64Histogram, ...) func() + type TestingT interface + Fatalf func(format string, args ...any) + Helper func() Other modules containing this package github.com/primandproper/platform-go github.com/primandproper/platform-go/v10 github.com/primandproper/platform-go/v11 github.com/primandproper/platform-go/v2 github.com/primandproper/platform-go/v3 github.com/primandproper/platform-go/v4 github.com/primandproper/platform-go/v5 github.com/primandproper/platform-go/v6 github.com/primandproper/platform-go/v7 github.com/primandproper/platform-go/v8 github.com/primandproper/platform-go/v9