Documentation
¶
Index ¶
- type AbstractFields
- type Emitter
- type ErrorMonitor
- type Event
- type FieldsChain
- type GenericErrorMonitor
- func (h *GenericErrorMonitor) Emitter() Emitter
- func (*GenericErrorMonitor) Flush()
- func (h *GenericErrorMonitor) ObserveError(belt *belt.Belt, err error) *Event
- func (h *GenericErrorMonitor) ObserveRecover(belt *belt.Belt, recoverResult any) *Event
- func (h *GenericErrorMonitor) WithContextFields(allFields *FieldsChain, _ int) belt.Tool
- func (h *GenericErrorMonitor) WithHooks(hooks ...Hook) ErrorMonitor
- func (h *GenericErrorMonitor) WithPreHooks(preHooks ...PreHook) ErrorMonitor
- func (h *GenericErrorMonitor) WithTraceIDs(allTraceIDs TraceIDs, _ int) belt.Tool
- type Hook
- type Hooks
- type PreHook
- type PreHooks
- type TraceIDs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractFields ¶
type AbstractFields = field.AbstractFields
AbstractFields is just a type alias for field.AbstractFields (for convenience).
type Emitter ¶
type Emitter = errmontypes.Emitter
Emitter is just a type alias for errmontypes.Emitter (for convenience).
type ErrorMonitor ¶
type ErrorMonitor = errmontypes.ErrorMonitor
ErrorMonitor is just a type alias for errmontypes.ErrorMonitor (for convenience).
func ErrorMonitorFromEmitter ¶
func ErrorMonitorFromEmitter( emitter Emitter, callerFrameFilter runtime.PCFilter, ) ErrorMonitor
ErrorMonitorFromEmitter wraps a Emitter with a generic implementation of of ErrorMonitor.
type Event ¶
type Event = errmontypes.Event
Event is just a type alias for errmontypes.Event (for convenience).
type FieldsChain ¶
type FieldsChain = field.FieldsChain
FieldsChain is just a type alias for field.FieldsChain (for convenience).
type GenericErrorMonitor ¶
type GenericErrorMonitor struct { EmitterValue Emitter CallerFrameFilter runtime.PCFilter ContextFields *FieldsChain TraceIDs TraceIDs PreHooks PreHooks Hooks Hooks }
GenericErrorMonitor implements ErrorMonitor given a Emitter.
func (*GenericErrorMonitor) Emitter ¶
func (h *GenericErrorMonitor) Emitter() Emitter
Emitter implements errmon.ErrorMonitor
func (*GenericErrorMonitor) Flush ¶
func (*GenericErrorMonitor) Flush()
Flush implements metrics.Metrics (or more specifically belt.Tool).
func (*GenericErrorMonitor) ObserveError ¶
func (h *GenericErrorMonitor) ObserveError(belt *belt.Belt, err error) *Event
ObserveError implements errmon.ErrorMonitor
func (*GenericErrorMonitor) ObserveRecover ¶
func (h *GenericErrorMonitor) ObserveRecover(belt *belt.Belt, recoverResult any) *Event
ObserveRecover implements errmon.ErrorMonitor
func (*GenericErrorMonitor) WithContextFields ¶
func (h *GenericErrorMonitor) WithContextFields(allFields *FieldsChain, _ int) belt.Tool
WithContextFields implements errmon.ErrorMonitor
func (*GenericErrorMonitor) WithHooks ¶
func (h *GenericErrorMonitor) WithHooks(hooks ...Hook) ErrorMonitor
WithHooks implements errmon.ErrorMonitor
func (*GenericErrorMonitor) WithPreHooks ¶
func (h *GenericErrorMonitor) WithPreHooks(preHooks ...PreHook) ErrorMonitor
WithPreHooks implements errmon.ErrorMonitor
func (*GenericErrorMonitor) WithTraceIDs ¶
func (h *GenericErrorMonitor) WithTraceIDs(allTraceIDs TraceIDs, _ int) belt.Tool
WithTraceIDs implements errmon.ErrorMonitor
type Hook ¶
type Hook = errmontypes.Hook
Hook is just a type alias for errmontypes.Hook (for convenience).
type Hooks ¶
type Hooks = errmontypes.Hooks
Hooks is just a type alias for errmontypes.Hooks (for convenience).
type PreHook ¶
type PreHook = errmontypes.PreHook
PreHook is just a type alias for errmontypes.PreHook (for convenience).
type PreHooks ¶
type PreHooks = errmontypes.PreHooks
PreHooks is just a type alias for errmontypes.PreHooks (for convenience).