Documentation ¶
Index ¶
- Variables
- func ContextWithConstantTraceID(ctx context.Context, traceID string) context.Context
- func ContextWithTraceID(ctx context.Context) (context.Context, bool)
- func ContextWithoutTraceID(ctx context.Context) context.Context
- func FormatEventLogFields(ctx context.Context, details []Detail) []zapcore.Field
- func FormatStepLogFields(ctx context.Context, details []Detail, mutators ...StepMutator) []zapcore.Field
- func FormatSubscribeLogFields(ctx context.Context, targetName string, targetDetails []Detail, ...) []zapcore.Field
- func FormatTraceLogFields(ctx context.Context) []zapcore.Field
- func GetTraceIDFromContext(ctx context.Context) string
- func LogError(ctx context.Context, logger *zap.Logger, text string, err error, ...) error
- func LogFatalError(ctx context.Context, logger *zap.Logger, text string, err error, ...) error
- func LogStep(ctx context.Context, logger *zap.Logger, text string, mutators ...StepMutator)
- func LogTraceEnd(ctx context.Context, logger *zap.Logger, text string, mutators ...StepMutator)
- func LogTraceStart(ctx context.Context, logger *zap.Logger, text string)
- func Section(ctx context.Context, logger *zap.Logger, name string) (context.Context, bool, func(error, string, ...StepMutator))
- func SimpleSection(ctx context.Context, logger *zap.Logger, name string) func(error, ...StepMutator)
- type Detail
- type Event
- type LogType
- type StatusType
- type Step
- type StepMutator
- func Status(st StatusType) StepMutator
- func UpdateTraceName(newTitle string) StepMutator
- func WithCIDDetail(name string, cidBytes []byte) StepMutator
- func WithDetail(name string, description string) StepMutator
- func WithError(err error) StepMutator
- func WithJSONDetail(name string, val interface{}) StepMutator
- type Subscribe
- type Trace
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NewSessionID = newID NewTraceID = newID )
View Source
var KnownLogTypes = []LogType{TraceType, StepType, EventType, SubscribeType}
Functions ¶
func ContextWithConstantTraceID ¶ added in v2.285.0
func ContextWithoutTraceID ¶ added in v2.285.0
func FormatEventLogFields ¶
func FormatStepLogFields ¶
func FormatSubscribeLogFields ¶ added in v2.285.0
func GetTraceIDFromContext ¶ added in v2.285.0
func LogFatalError ¶ added in v2.285.0
func LogTraceEnd ¶ added in v2.285.0
func LogTraceStart ¶ added in v2.285.0
func SimpleSection ¶ added in v2.285.0
Types ¶
type StatusType ¶
type StatusType string
const ( Running StatusType = "running" Succeeded StatusType = "succeeded" Failed StatusType = "failed" )
type Step ¶
type Step struct { ParentTraceID string `json:"parentTraceID"` Details []Detail `json:"details"` Status StatusType `json:"status"` EndTrace bool `json:"endTrace"` UpdateTraceName string `json:"updateTraceName"` ForceReopen bool `json:"forceReopen"` }
func ForceReopen ¶ added in v2.285.0
type StepMutator ¶ added in v2.285.0
func Status ¶ added in v2.285.0
func Status(st StatusType) StepMutator
func UpdateTraceName ¶ added in v2.285.0
func UpdateTraceName(newTitle string) StepMutator
func WithCIDDetail ¶ added in v2.285.0
func WithCIDDetail(name string, cidBytes []byte) StepMutator
func WithDetail ¶ added in v2.285.0
func WithDetail(name string, description string) StepMutator
func WithError ¶ added in v2.285.0
func WithError(err error) StepMutator
func WithJSONDetail ¶ added in v2.285.0
func WithJSONDetail(name string, val interface{}) StepMutator
Source Files ¶
Click to show internal directories.
Click to hide internal directories.