logs

package
v0.0.0-...-f208202 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package logs provides utilities for managing and manipulating log in Arrow format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

func NewIterator

func NewIterator(r *Reader) *Iterator

func (*Iterator) Attributes

func (it *Iterator) Attributes(fn func(key, value string))

func (*Iterator) EventName

func (it *Iterator) EventName() string

func (*Iterator) HasNext

func (it *Iterator) HasNext() bool

func (*Iterator) Level

func (it *Iterator) Level() string

func (*Iterator) Message

func (it *Iterator) Message() string

func (*Iterator) SpanID

func (it *Iterator) SpanID() []byte

func (*Iterator) TimestampNS

func (it *Iterator) TimestampNS() int64

func (*Iterator) TraceID

func (it *Iterator) TraceID() []byte

type LogsBuilder

type LogsBuilder struct {
	// contains filtered or unexported fields
}

LogsBuilder represents a builder for log entries.

func NewLogsBuilder

func NewLogsBuilder(allocator memory.Allocator) *LogsBuilder

NewLogsBuilder creates a new LogsBuilder with the given memory allocator.

func (*LogsBuilder) AppendAttributes

func (lb *LogsBuilder) AppendAttributes(nunOfItems int) (appender func(k, v string))

AppendAttributes reserves space for the specified number of attributes. It returns a function that can be used to append key-value pairs to the attributes list.

func (*LogsBuilder) AppendEventName

func (lb *LogsBuilder) AppendEventName(eventName string)

AppendEventName appends an event name string to the logs builder.

func (*LogsBuilder) AppendLevel

func (lb *LogsBuilder) AppendLevel(level string)

AppendLevel appends a level string to the logs builder.

func (*LogsBuilder) AppendMessage

func (lb *LogsBuilder) AppendMessage(message string)

AppendMessage appends a message string to the logs builder.

func (*LogsBuilder) AppendSpanID

func (lb *LogsBuilder) AppendSpanID(spanID []byte)

AppendSpanID appends a span ID byte slice to the logs builder.

func (*LogsBuilder) AppendTimestampNS

func (lb *LogsBuilder) AppendTimestampNS(timestamp int64)

AppendTimestampNS appends a timestamp in nanoseconds to the logs builder.

func (*LogsBuilder) AppendTraceID

func (lb *LogsBuilder) AppendTraceID(traceID []byte)

AppendTraceID appends a trace ID byte slice to the logs builder.

func (*LogsBuilder) Build

func (lb *LogsBuilder) Build() (attributes, logs arrow.RecordBatch)

func (*LogsBuilder) EndLog

func (lb *LogsBuilder) EndLog()

EndLog finalizes the current log entry and aligns all columns. NOTE: must be called after appending fields for a log entry.

func (*LogsBuilder) NumOfRows

func (lb *LogsBuilder) NumOfRows() int

NumOfRows returns the number of log entries appended so far.

func (*LogsBuilder) Release

func (lb *LogsBuilder) Release()

Release releases the resources held by the LogsBuilder.

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(logs, attrs arrow.RecordBatch) *Reader

func (*Reader) Attributes

func (r *Reader) Attributes(row int, fn func(key, value string))

func (*Reader) EventName

func (r *Reader) EventName(row int) string

func (*Reader) Iterator

func (r *Reader) Iterator() *Iterator

func (*Reader) Level

func (r *Reader) Level(row int) string

func (*Reader) Message

func (r *Reader) Message(row int) string

func (*Reader) NumRows

func (r *Reader) NumRows() int

func (*Reader) SpanID

func (r *Reader) SpanID(row int) []byte

func (*Reader) TimestampNS

func (r *Reader) TimestampNS(row int) int64

func (*Reader) TraceID

func (r *Reader) TraceID(row int) []byte

Directories

Path Synopsis
Package v1 provides arrow schema definitions for traces data.
Package v1 provides arrow schema definitions for traces data.

Jump to

Keyboard shortcuts

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