Documentation ¶
Index ¶
- func CorrelationId(ctx context.Context) string
- func DumpConfigForDevelopment()
- func EdgeRequestId(ctx context.Context) string
- func InitializeLogger() (zerolog.Logger, func())
- func InitializeStdout()
- func JobId(ctx context.Context) string
- func JobType(ctx context.Context) string
- func ReservationId(ctx context.Context) int64
- func TraceId(ctx context.Context) string
- func WithCorrelationId(ctx context.Context, id string) context.Context
- func WithEdgeRequestId(ctx context.Context, id string) context.Context
- func WithJobId(ctx context.Context, id string) context.Context
- func WithJobType(ctx context.Context, id string) context.Context
- func WithReservationId(ctx context.Context, id int64) context.Context
- type SentryReplacer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CorrelationId ¶
CorrelationId returns UI correlation id or an empty string when not set.
func DumpConfigForDevelopment ¶
func DumpConfigForDevelopment()
func EdgeRequestId ¶
EdgeRequestId returns edge API (3Scale) request id or an empty string when not set.
func InitializeLogger ¶
InitializeLogger initializes logging to cloudwatch client and enables sentry Error logging. If cloudwatch is disabled, we enable stdout output.
func InitializeStdout ¶
func InitializeStdout()
InitializeStdout initializes logging to standard output with human-friendly output. It is used in unit and database tests.
func ReservationId ¶
ReservationId returns request id or an empty string when not set.
func WithCorrelationId ¶
WithCorrelationId returns context copy with correlation id value.
func WithEdgeRequestId ¶
WithEdgeRequestId returns context copy with trace id value.
func WithJobType ¶
WithJobType returns context copy with relevant value.
Types ¶
type SentryReplacer ¶
type SentryReplacer struct {
// contains filtered or unexported fields
}
func NewSentryReplacer ¶
func NewSentryReplacer() *SentryReplacer
func (*SentryReplacer) Replace ¶
func (sr *SentryReplacer) Replace(event *sentry.Event, hint *sentry.EventHint) *sentry.Event