logging

package
v0.0.0-...-4263410 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorrelationId

func CorrelationId(ctx context.Context) string

CorrelationId returns UI correlation id or an empty string when not set.

func DumpConfigForDevelopment

func DumpConfigForDevelopment()

func EdgeRequestId

func EdgeRequestId(ctx context.Context) string

EdgeRequestId returns edge API (3Scale) request id or an empty string when not set.

func InitializeLogger

func InitializeLogger() (zerolog.Logger, func())

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 JobId

func JobId(ctx context.Context) string

JobId returns request id or an empty string when not set.

func JobType

func JobType(ctx context.Context) string

JobType returns relevant context data or empty string when not set.

func ReservationId

func ReservationId(ctx context.Context) int64

ReservationId returns request id or an empty string when not set.

func TraceId

func TraceId(ctx context.Context) string

TraceId returns request id or an empty string when not set.

func WithCorrelationId

func WithCorrelationId(ctx context.Context, id string) context.Context

WithCorrelationId returns context copy with correlation id value.

func WithEdgeRequestId

func WithEdgeRequestId(ctx context.Context, id string) context.Context

WithEdgeRequestId returns context copy with trace id value.

func WithJobId

func WithJobId(ctx context.Context, id string) context.Context

WithJobId returns context copy with trace id value.

func WithJobType

func WithJobType(ctx context.Context, id string) context.Context

WithJobType returns context copy with relevant value.

func WithReservationId

func WithReservationId(ctx context.Context, id int64) context.Context

WithReservationId returns context copy with trace id 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL