Documentation ¶
Overview ¶
Package chstorage provides Clickhouse-based storage.
Index ¶
- type Inserter
- func (i *Inserter) ConsumeMetrics(ctx context.Context, metrics pmetric.Metrics) error
- func (i *Inserter) InsertLogLabels(ctx context.Context, set map[logstorage.Label]struct{}) (rerr error)
- func (i *Inserter) InsertRecords(ctx context.Context, records []logstorage.Record) (rerr error)
- func (i *Inserter) InsertSpans(ctx context.Context, spans []tracestorage.Span) (rerr error)
- func (i *Inserter) InsertTags(ctx context.Context, tags map[tracestorage.Tag]struct{}) (rerr error)
- type InserterOptions
- type Querier
- func (q *Querier) Capabilities() (caps logqlengine.QuerierCapabilities)
- func (q *Querier) ExemplarQuerier(ctx context.Context) (storage.ExemplarQuerier, error)
- func (q *Querier) LabelNames(ctx context.Context, opts logstorage.LabelsOptions) (_ []string, rerr error)
- func (q *Querier) LabelValues(ctx context.Context, labelName string, opts logstorage.LabelsOptions) (_ iterators.Iterator[logstorage.Label], rerr error)
- func (q *Querier) Querier(mint, maxt int64) (storage.Querier, error)
- func (q *Querier) SearchTags(ctx context.Context, tags map[string]string, ...) (_ iterators.Iterator[tracestorage.Span], rerr error)
- func (q *Querier) SelectLogs(ctx context.Context, start, end otelstorage.Timestamp, ...) (_ iterators.Iterator[logstorage.Record], rerr error)
- func (q *Querier) SelectSpansets(ctx context.Context, params traceqlengine.SelectSpansetsParams) (_ iterators.Iterator[traceqlengine.Trace], rerr error)
- func (q *Querier) TagNames(ctx context.Context) (r []string, rerr error)
- func (q *Querier) TagValues(ctx context.Context, tagName string) (_ iterators.Iterator[tracestorage.Tag], rerr error)
- func (q *Querier) TraceByID(ctx context.Context, id otelstorage.TraceID, ...) (_ iterators.Iterator[tracestorage.Span], rerr error)
- type QuerierOptions
- type Tables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inserter ¶
type Inserter struct {
// contains filtered or unexported fields
}
Inserter implements tracestorage.Inserter using Clickhouse.
func NewInserter ¶
func NewInserter(c *chpool.Pool, opts InserterOptions) (*Inserter, error)
NewInserter creates new Inserter.
func (*Inserter) ConsumeMetrics ¶ added in v0.1.0
ConsumeMetrics inserts given metrics.
func (*Inserter) InsertLogLabels ¶ added in v0.1.0
func (i *Inserter) InsertLogLabels(ctx context.Context, set map[logstorage.Label]struct{}) (rerr error)
InsertLogLabels inserts given set of labels to the storage.
func (*Inserter) InsertRecords ¶ added in v0.1.0
InsertRecords inserts given records.
func (*Inserter) InsertSpans ¶
InsertSpans inserts given spans.
func (*Inserter) InsertTags ¶
InsertTags insert given set of tags to the storage.
type InserterOptions ¶ added in v0.0.8
type InserterOptions struct { // Tables provides table paths to query. Tables Tables // MeterProvider provides OpenTelemetry meter for this querier. MeterProvider metric.MeterProvider // TracerProvider provides OpenTelemetry tracer for this querier. TracerProvider trace.TracerProvider }
InserterOptions is Inserter's options.
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
Querier implements tracestorage.Querier using Clickhouse.
func NewQuerier ¶
func NewQuerier(c *chpool.Pool, opts QuerierOptions) (*Querier, error)
NewQuerier creates new Querier.
func (*Querier) Capabilities ¶ added in v0.1.0
func (q *Querier) Capabilities() (caps logqlengine.QuerierCapabilities)
Capabilities implements logqlengine.Querier.
func (*Querier) ExemplarQuerier ¶ added in v0.2.0
Querier returns a new Querier on the storage.
func (*Querier) LabelNames ¶ added in v0.1.0
func (q *Querier) LabelNames(ctx context.Context, opts logstorage.LabelsOptions) (_ []string, rerr error)
LabelNames implements logstorage.Querier.
func (*Querier) LabelValues ¶ added in v0.1.0
func (q *Querier) LabelValues(ctx context.Context, labelName string, opts logstorage.LabelsOptions) (_ iterators.Iterator[logstorage.Label], rerr error)
LabelValues implements logstorage.Querier.
func (*Querier) SearchTags ¶
func (q *Querier) SearchTags(ctx context.Context, tags map[string]string, opts tracestorage.SearchTagsOptions) (_ iterators.Iterator[tracestorage.Span], rerr error)
SearchTags performs search by given tags.
func (*Querier) SelectLogs ¶ added in v0.1.0
func (q *Querier) SelectLogs(ctx context.Context, start, end otelstorage.Timestamp, params logqlengine.SelectLogsParams) (_ iterators.Iterator[logstorage.Record], rerr error)
SelectLogs implements logqlengine.Querier.
func (*Querier) SelectSpansets ¶ added in v0.0.8
func (q *Querier) SelectSpansets(ctx context.Context, params traceqlengine.SelectSpansetsParams) (_ iterators.Iterator[traceqlengine.Trace], rerr error)
SelectSpansets get spansets from storage.
func (*Querier) TagValues ¶
func (q *Querier) TagValues(ctx context.Context, tagName string) (_ iterators.Iterator[tracestorage.Tag], rerr error)
TagValues returns all available tag values for given tag.
func (*Querier) TraceByID ¶
func (q *Querier) TraceByID(ctx context.Context, id otelstorage.TraceID, opts tracestorage.TraceByIDOptions) (_ iterators.Iterator[tracestorage.Span], rerr error)
TraceByID returns spans of given trace.
type QuerierOptions ¶ added in v0.0.8
type QuerierOptions struct { // Tables provides table paths to query. Tables Tables // MeterProvider provides OpenTelemetry meter for this querier. MeterProvider metric.MeterProvider // TracerProvider provides OpenTelemetry tracer for this querier. TracerProvider trace.TracerProvider }
QuerierOptions is Querier's options.
type Tables ¶
type Tables struct { Spans string Tags string Points string Histograms string ExpHistograms string Summaries string Exemplars string Labels string Logs string LogAttrs string Migration string }
Tables define table names.
func DefaultTables ¶ added in v0.1.0
func DefaultTables() Tables
DefaultTables returns default tables.
Source Files ¶
- chstorage.go
- columns.go
- columns_logs.go
- columns_metrics.go
- columns_migration.go
- columns_traces.go
- escape.go
- inserter.go
- inserter_logs.go
- inserter_metrics.go
- inserter_traces.go
- querier.go
- querier_logs.go
- querier_metrics.go
- querier_metrics_exemplars.go
- querier_metrics_hist.go
- querier_metrics_point.go
- querier_traces.go
- schema.go
- schema_logs.go
- schema_metrics.go
- schema_migration.go
- schema_traces.go