Documentation ¶
Index ¶
- Constants
- func EnrichEvent(ctx context.Context, enrichment EventEnrichment) context.Context
- func EventFromLog(level sentry.Level, ctx context.Context, message any, fields ...log.Field) *sentry.Event
- func SetException(e *sentry.Event, exception error)
- type Config
- type EventEnrichment
- type Hub
- type Logger
- func (s Logger) Debug(ctx context.Context, message any, fields ...log.Field)
- func (s Logger) Error(ctx context.Context, message any, fields ...log.Field)
- func (s Logger) Info(ctx context.Context, message any, fields ...log.Field)
- func (s Logger) Warn(ctx context.Context, message any, fields ...log.Field)
- type NoopHub
- type SdkHub
Constants ¶
View Source
const (
RequestIdKey = "requestId"
)
Variables ¶
This section is empty.
Functions ¶
func EnrichEvent ¶
func EnrichEvent(ctx context.Context, enrichment EventEnrichment) context.Context
func EventFromLog ¶
func SetException ¶
func SetException(e *sentry.Event, exception error)
SetException Compare to sentry.Event.SetException, we don't add local stacktrace if there is no stack in error
Types ¶
type EventEnrichment ¶
type EventEnrichment func(event *sentry.Event)
type Hub ¶
type Hub interface { CatchError(ctx context.Context, err error, level log.Level) CatchEvent(ctx context.Context, event *sentry.Event) Flush() }
func NewHubFromConfiguration ¶
type NoopHub ¶
type NoopHub struct { }
func NewNoopHub ¶
func NewNoopHub() NoopHub
func (NoopHub) CatchError ¶
func (NoopHub) CatchEvent ¶
type SdkHub ¶
type SdkHub struct {
// contains filtered or unexported fields
}
func (SdkHub) CatchError ¶
func (SdkHub) CatchEvent ¶
Click to show internal directories.
Click to hide internal directories.