Documentation
¶
Overview ¶
Package logs defines types used for the data object logs section. The logs section holds a list of log records across multiple streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Iter ¶
Iter iterates over records in the provided decoder. All logs sections are iterated over in order.
func IterSection ¶ added in v3.5.0
func IterSection(ctx context.Context, dec encoding.LogsDecoder, section *filemd.SectionInfo) result.Seq[Record]
Types ¶
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
Logs accumulate a set of [Record]s within a data object.
func New ¶
Nwe creates a new Logs section. The pageSize argument specifies how large pages should be.
func (*Logs) EncodeTo ¶
EncodeTo encodes the set of logs to the provided encoder. Before encoding, log records are sorted by StreamID and Timestamp.
EncodeTo may generate multiple sections if the list of log records is too big to fit into a single section.
Logs.Reset is invoked after encoding, even if encoding fails.
func (*Logs) EstimatedSize ¶
EstimatedSize returns the estimated size of the Logs section in bytes.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics instruments the logs section.
func NewMetrics ¶
func NewMetrics() *Metrics
NewMetrics creates a new set of metrics for the logs section.
func (*Metrics) Register ¶
func (m *Metrics) Register(reg prometheus.Registerer) error
Register registers metrics to report to reg.
func (*Metrics) Unregister ¶
func (m *Metrics) Unregister(reg prometheus.Registerer)
Unregister unregisters metrics from the provided Registerer.
type Options ¶
type Options struct { // PageSizeHint is the size of pages to use when encoding the logs section. PageSizeHint int // BufferSize is the size of the buffer to use when accumulating log records. BufferSize int // SectionSizeHint is the size of the section to use when encoding the logs // section. If the section size is exceeded, multiple sections will be // created. SectionSize int // StripeMergeLimit is the maximum number of stripes to merge at once when // flushing stripes into a section. StripeMergeLimit must be larger than 1. // // Lower values of StripeMergeLimit reduce the memory overhead of merging but // increase time spent merging. Higher values of StripeMergeLimit increase // memory overhead but reduce time spent merging. StripeMergeLimit int }
Options configures the behavior of the logs section.
type Record ¶
A Record is an individual log record within the logs section.
func Decode ¶ added in v3.5.0
Decode decodes a record from a dataset.Row, using the provided columns to determine the column type. The list of columns must match the columns used to create the row.