Documentation
¶
Overview ¶
Package logstorage defines storage structure for logs storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer consumes given logs and inserts them using given Inserter.
type Inserter ¶
type Inserter interface { // InsertRecords inserts given records. InsertRecords(ctx context.Context, records []Record) error // InsertLogLabels insert given set of labels to the storage. InsertLogLabels(ctx context.Context, labels map[Label]struct{}) error }
Inserter is a log storage insert interface.
type Label ¶
type Label struct { Name string `json:"name" yson:"name"` Value string `json:"value" yson:"value"` Type int32 `json:"type" yson:"type"` }
Label is a data structure for log label.
type LabelsOptions ¶
type LabelsOptions struct { // Start defines time range for search. // // Querier ignores parameter, if it is zero. Start otelstorage.Timestamp // End defines time range for search. // // Querier ignores parameter, if it is zero. End otelstorage.Timestamp }
LabelsOptions defines options for Labels and LabelValues methods.
type Querier ¶
type Querier interface { // LabelNames returns all available label names. LabelNames(ctx context.Context, opts LabelsOptions) ([]string, error) // LabelValues returns all available label values for given label. LabelValues(ctx context.Context, labelName string, opts LabelsOptions) (iterators.Iterator[Label], error) }
Querier is a logs storage query interface.
type Record ¶
type Record struct { Timestamp otelstorage.Timestamp `json:"timestamp" yson:"timestamp"` ObservedTimestamp otelstorage.Timestamp `json:"observed_timestamp" yson:"observed_timestamp"` TraceID otelstorage.TraceID `json:"trace_id" yson:"trace_id"` SpanID otelstorage.SpanID `json:"span_id" yson:"span_id"` Flags plog.LogRecordFlags `json:"flags" yson:"flags"` SeverityText string `json:"severity_text" yson:"severity_text"` SeverityNumber plog.SeverityNumber `json:"severity_number" yson:"severity_number"` Body string `json:"body" yson:"body"` Attrs otelstorage.Attrs `json:"attrs" yson:"attrs"` ResourceAttrs otelstorage.Attrs `json:"resource_attrs" yson:"resource_attrs"` ScopeName string `json:"scope_name" yson:"scope_name"` ScopeVersion string `json:"scope_version" yson:"scope_version"` ScopeAttrs otelstorage.Attrs `json:"scope_attrs" yson:"scope_attrs"` }
Record is a log record.
func NewRecordFromOTEL ¶
func NewRecordFromOTEL( res pcommon.Resource, scope pcommon.InstrumentationScope, record plog.LogRecord, ) Record
NewRecordFromOTEL creates new Record.
Click to show internal directories.
Click to hide internal directories.