Documentation ¶
Index ¶
- func AddBreadcrumb(ctx context.Context, category, msg string)
- func ApplyOptions(entry *logger.Entry, opts ...NoticeOption) *logger.Entry
- func CopyCtx(ctx context.Context) context.Context
- func InitFromEnv() error
- func NewMiddleware() gin.HandlerFunc
- func NoticeError(ctx context.Context, err error, msg string, opts ...NoticeOption)
- func NoticeInfo(ctx context.Context, msg string, opts ...NoticeOption)
- func NoticeWarning(ctx context.Context, msg string, opts ...NoticeOption)
- func Recover(timeout time.Duration)
- func SetTag(ctx context.Context, key string, value string)
- func SetTags(ctx context.Context, tags map[string]string)
- func SetUser(ctx context.Context, id uuid.UUID, email string)
- type NoticeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBreadcrumb ¶
AddBreadcrumb adds new breadcrumb to the current scope.
func ApplyOptions ¶ added in v0.30.2
func ApplyOptions(entry *logger.Entry, opts ...NoticeOption) *logger.Entry
func CopyCtx ¶
CopyCtx creates a context.Context containing separate scope, which can be safely used in goroutine.
func InitFromEnv ¶
func InitFromEnv() error
InitFromEnv reads SENTRY_DSN and SENTRY_ENV from environment, and creates a new client.
func NewMiddleware ¶
func NewMiddleware() gin.HandlerFunc
NewMiddleware creates new instrumentation miggleware, that can be used with gin.
func NoticeError ¶
func NoticeError(ctx context.Context, err error, msg string, opts ...NoticeOption)
func NoticeInfo ¶
func NoticeInfo(ctx context.Context, msg string, opts ...NoticeOption)
func NoticeWarning ¶
func NoticeWarning(ctx context.Context, msg string, opts ...NoticeOption)
Types ¶
type NoticeOption ¶
func WithField ¶
func WithField(key string, value interface{}) NoticeOption
func WithFields ¶
func WithFields(fields map[string]interface{}) NoticeOption
Click to show internal directories.
Click to hide internal directories.