Versions in this module Expand all Collapse all v0 v0.2.0 Jul 19, 2026 Changes in this version + func NormalizeSQL(sql string) string + func RecordDatabase(ctx context.Context, sql string, duration time.Duration) + func RecordExternal(ctx context.Context, duration time.Duration) + func TrackJob(ctx context.Context, jobClass, queue string, ...) error type Client + func (c *Client) NotifyLog(message, level, source string) Result + func (c *Client) NotifyTransaction(transaction Transaction) Result + func (c *Client) TrackJob(ctx context.Context, jobClass, queue string, ...) error type Config + APMEnabled bool + APMSampleRate float64 + LogsEnabled bool + MinimumLogLevel slog.Level + RootDirectory string type Frame + Source *SourceExcerpt + type LogEntry struct + Environment string + Level string + Message string + OccurredAt time.Time + Source string type Result + func NotifyLog(message, level, source string) Result + func NotifyTransaction(transaction Transaction) Result + type SlogHandler struct + func NewSlogHandler(next slog.Handler, client *Client, minimumLevel slog.Level) *SlogHandler + func (h *SlogHandler) Enabled(ctx context.Context, level slog.Level) bool + func (h *SlogHandler) Handle(ctx context.Context, record slog.Record) error + func (h *SlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *SlogHandler) WithGroup(name string) slog.Handler + type SourceExcerpt struct + Lines []string + StartLine int + type Span struct + DurationMS float64 + File string + Function string + Kind string + Line int + SQL string + type SpanCollector struct + func WithSpanCollector(ctx context.Context) (context.Context, *SpanCollector) + func (c *SpanCollector) Spans() []Span + type Transaction struct + DurationMS float64 + Environment string + JobClass string + Kind string + Method string + OccurredAt time.Time + Path string + PathRaw string + Queue string + Spans []Span + StatusCode int v0.1.0 Jul 6, 2026 Changes in this version + const Version + var DefaultFilterKeys = []string + var ErrMissingEndpoint = errors.New("errorgap: Endpoint is required") + var ErrMissingProjectSlug = errors.New("errorgap: ProjectSlug is required") + func Close(ctx context.Context) error + func FilterParams(params map[string]any, filterKeys []string) map[string]any + func Flush(ctx context.Context) error + func Init(cfg Config) error + func Recover() + type Client struct + func NewClient(cfg Config) (*Client, error) + func (c *Client) Close(ctx context.Context) error + func (c *Client) Config() Config + func (c *Client) Flush(ctx context.Context) error + func (c *Client) Notify(err error, opts ...NoticeOptions) Result + type Config struct + APIKey string + Async bool + CaptureGlobals bool + Endpoint string + Environment string + FilterKeys []string + HTTPClient *http.Client + Logger *slog.Logger + ProjectID string + ProjectSlug string + QueueSize int + Release string + Timeout time.Duration + type ErrorEntry struct + Backtrace []Frame + Message string + Type string + type Frame struct + File string + Function string + InApp bool + Index int + Line int + type Notice struct + Context map[string]any + Environment map[string]any + Errors []ErrorEntry + Params map[string]any + ProjectID string + ReceivedAt string + Session map[string]any + type NoticeOptions struct + BacktraceSkip int + Context map[string]any + Environment map[string]any + Params map[string]any + Session map[string]any + type Result struct + Body []byte + Err error + Queued bool + Status int + func Notify(err error, opts ...NoticeOptions) Result + func (r Result) Success() bool