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 ¶
SetException Compare to sentry.Event.SetException, we don't add local stacktrace if there is no stack in error
Types ¶
type EventEnrichment ¶
type Hub ¶
type Hub interface {
CatchError(ctx context.Context, err error, level log.Level)
CatchEvent(ctx context.Context, event *sentry.Event)
Flush()
}
func NewHubFromConfiguration ¶
nolint:ireturn
type NoopHub ¶
type NoopHub struct {
}
func NewNoopHub ¶
func NewNoopHub() NoopHub
func (NoopHub) CatchError ¶
type SdkHub ¶
type SdkHub struct {
// contains filtered or unexported fields
}
func (SdkHub) CatchError ¶
Click to show internal directories.
Click to hide internal directories.