Versions in this module Expand all Collapse all v1 v1.1.9 Dec 16, 2024 v1.1.8 Dec 16, 2024 v1.1.7 Dec 16, 2024 v1.1.6 Dec 12, 2024 v1.1.5 Dec 12, 2024 Changes in this version + func NewContextWithHeader(header http.Header) context.Context v1.1.4 Dec 9, 2024 v1.1.3 Dec 9, 2024 v1.1.2 Nov 20, 2024 v1.1.1 Nov 19, 2024 Changes in this version type Bucket + Count func() (count int) + GetBatch func() (batch int) + GetConcurrency func() (concurrency int32) + GetFrequency func() (frequency int) + type DebuggerManager interface + Error func(format string, args ...any) + Fatal func(format string, args ...any) + Info func(format string, args ...any) + var Debugger DebuggerManager type Entity + Message string + func NewEntityWithBody(body []byte) *Entity type Item + Message func() string + ParentSpan func() (SpanId, int32) + Span func() (SpanId, int32) + String func() string + type LoggingFormatter interface + ToByte func(item Item) []byte + ToString func(item Item) string + type LoggingManager interface + GetPlugin func() (plugin LoggingPlugin) + Log func(ctx context.Context, level base.Level, message string) + Send func(items ...Item) + SetPlugin func(plugin LoggingPlugin) + Wait func() + type LoggingPlugin interface + GetFormatter func() (formatter LoggingFormatter) + GetWriter func() (formatter LoggingWriter) + SetFormatter func(formatter LoggingFormatter) + SetWriter func(writer LoggingWriter) + Sync func() bool + Write func(items []Item) (err error) + type LoggingWriter interface + Write func(formatter LoggingFormatter, items []Item) (err error) type SpanFormatter + ToByte func(span Span) []byte + ToString func(span Span) string + type SpanManager interface + GetPlugin func() (plugin SpanPlugin) + Send func(span Span) + SetPlugin func(plugin SpanPlugin) + Wait func() type SpanPlugin + GetReporter func() (reporter SpanReporter) + Report func(spans []Span) (err error) + SetReporter func(reporter SpanReporter) + type SpanReporter interface + Report func(formatter SpanFormatter, spans []Span) (err error) + type SpanWithGetter interface + GetAttr func() Attr + GetContext func() context.Context + GetDuration func() time.Duration + GetEndTime func() time.Time + GetLogs func() []Item + GetName func() string + GetStartTime func() time.Time + GetTracing func() Tracing + type SpanWithLogger interface + Debug func(format string, args ...any) + Error func(format string, args ...any) + Fatal func(format string, args ...any) + Info func(format string, args ...any) + Warn func(format string, args ...any) v1.1.0 Nov 18, 2024 Changes in this version + const AttrHeader + const AttrProtocol + const AttrRequestMethod + const AttrRequestUrl + const AttrUserAgent + const ContextKey + const DefaultBucketBatch + const DefaultBucketConcurrency + const DefaultBucketFrequency + func AttachRequest(ctx context.Context, req *http.Request) + func GetContextHeader(ctx context.Context) map[string]string + func NewContext(cts ...context.Context) context.Context + func ReleaseItems(items ...*Item) + func SetContextTracing(ctx context.Context, tracing Tracing) context.Context + type Attr map[string]any + func (o Attr) Count() int + func (o Attr) Set(key string, value any) + func (o Attr) SetHeader(val any) + func (o Attr) SetProtocol(val any) + func (o Attr) SetRequestMethod(val any) + func (o Attr) SetRequestUrl(val any) + func (o Attr) SetUserAgent(val any) + func (o Attr) Unset(key string) + type Bucket struct + func NewBucket[T any](name string, handler func(...T)) *Bucket[T] + func (o *Bucket[T]) Add(items ...T) + func (o *Bucket[T]) Name() string + func (o *Bucket[T]) SetBatch(batch int) + func (o *Bucket[T]) SetConcurrency(concurrency int32) + func (o *Bucket[T]) SetFrequency(frequency int) + func (o *Bucket[T]) Start() + func (o *Bucket[T]) Stop() + func (o *Bucket[T]) Wait() + type Entity struct + Level base.Level + ParentSpanId string + ParentSpanPosition int32 + Pid int + ServiceAddresses []string + ServiceHost string + ServiceName string + ServicePort int + ServiceVersion string + SpanId string + SpanPosition int32 + Stack string + Text string + Time string + TimeMicro int64 + TraceId string + func NewEntity(item *Item) *Entity + func (o *Entity) Byte() []byte + func (o *Entity) Release() + func (o *Entity) String() string + type Generator interface + Convert func(bs []byte) string + Decode func(str string) (b []byte) + Make func(n int) (b []byte) + func NewGenerator() Generator + type Item struct + Level base.Level + ParentSpanId SpanId + ParentSpanPosition int32 + SpanId SpanId + SpanPosition int32 + Stack Stack + Text string + Time time.Time + TraceId TraceId + func NewItem(ctx context.Context, level base.Level, text string) *Item + func (o *Item) Copy() *Item + func (o *Item) Release() + type LoggerFormatter interface + ToByte func(item *Item) []byte + ToString func(item *Item) string + type LoggerPlugin interface + GetFormatter func() (formatter LoggerFormatter) + Send func(item *Item) + SetFormatter func(formatter LoggerFormatter) + Wait func() + type Span interface + Child func(format string, args ...any) Span + End func() + Release func() + type SpanForGetter interface + GetAttr func() Attr + GetContext func() context.Context + GetDuration func() time.Duration + GetEndTime func() time.Time + GetLogs func() []*Item + GetName func() string + GetStartTime func() time.Time + GetTracing func() Tracing + type SpanForLogger interface + Debug func(format string, args ...any) + Error func(format string, args ...any) + Fatal func(format string, args ...any) + Info func(format string, args ...any) + Warn func(format string, args ...any) + type SpanFormatter interface + type SpanId interface + Byte func() []byte + String func() string + func NewSpanId() SpanId + func NewSpanIdWithHex(s string) SpanId + type SpanPlugin interface + GetFormatter func() (formatter SpanFormatter) + Send func(span Span) + SetFormatter func(formatter SpanFormatter) + Wait func() + type Stack interface + String func() string + func NewStack() Stack + type StackItem struct + Callee string + Line int + Path string + func (o *StackItem) Parse(s string) *StackItem + func (o *StackItem) Render(i int) string + type TraceId interface + Byte func() []byte + String func() string + func NewTraceId() TraceId + func NewTraceIdWithHex(s string) TraceId + type Tracing interface + Child func() Tracing + GetParent func() (SpanId, int32) + GetParentSpanId func() SpanId + GetSpan func() (SpanId, int32) + GetSpanAndIncrement func() (SpanId, int32) + GetSpanId func() SpanId + GetTraceId func() TraceId + func GetContextTracing(ctx context.Context) Tracing + func NewTracing() Tracing + func NewTracingWithContext(ctx context.Context) Tracing + func NewTracingWithHeader(header http.Header) Tracing + func NewTracingWithRequest(request *http.Request) Tracing