trc1log

package
v1.58.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 10

Documentation

Index

Constants

View Source
const (
	TypeValue = "trace.1"

	SpanKey = "span"

	SpanIDKey          = "id"
	SpanNameKey        = "name"
	SpanParentIDKey    = "parentId"
	SpanTimestampKey   = "timestamp"
	SpanDurationKey    = "duration"
	SpanAnnotationsKey = "annotations"
	SpanTagsKey        = "tags"

	AnnotationTimestampKey = "timestamp"
	AnnotationValueKey     = "value"
	AnnotationEndpointKey  = "endpoint"

	EndpointServiceNameKey = "serviceName"
	EndpointIPv4Key        = "ipv4"
	EndpointIPv6Key        = "ipv6"
)

Variables

This section is empty.

Functions

func ApplyParam

func ApplyParam(p Param, entry wlog.LogEntry)

func ToParams added in v1.12.0

func ToParams(span wtracing.SpanModel, inParams []Param) []wlog.Param

func WithLogger

func WithLogger(ctx context.Context, logger Logger) context.Context

WithLogger returns a copy of the provided context with the provided Logger included as a value.

Types

type Logger

type Logger interface {
	wtracing.Reporter
	Log(wtracing.SpanModel, ...Param)
}

func DefaultLogger

func DefaultLogger() Logger

func FromContext

func FromContext(ctx context.Context) Logger

FromContext returns the Logger stored in the provided context. If no logger was set on the context, returns a logger that logs to STDOUT at the INFO level with an empty origin field.

func New

func New(w io.Writer) Logger

func NewFromCreator

func NewFromCreator(w io.Writer, creator wlog.LoggerCreator) Logger

func WithParams

func WithParams(logger Logger, params ...Param) Logger

type Param

type Param interface {
	// contains filtered or unexported methods
}

func OrgID added in v1.41.0

func OrgID(orgID string) Param

func SID

func SID(sid string) Param

func TokenID

func TokenID(tokenID string) Param

func UID

func UID(uid string) Param

func UnsafeParam

func UnsafeParam(key string, value interface{}) Param

func UnsafeParams

func UnsafeParams(unsafe map[string]interface{}) Param

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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