chstorage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Package chstorage provides Clickhouse-based storage.

Index

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

func (i *Inserter) ConsumeMetrics(ctx context.Context, metrics pmetric.Metrics) error

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

func (i *Inserter) InsertRecords(ctx context.Context, records []logstorage.Record) (rerr error)

InsertRecords inserts given records.

func (*Inserter) InsertSpans

func (i *Inserter) InsertSpans(ctx context.Context, spans []tracestorage.Span) (rerr error)

InsertSpans inserts given spans.

func (*Inserter) InsertTags

func (i *Inserter) InsertTags(ctx context.Context, tags map[tracestorage.Tag]struct{}) (rerr error)

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

func (q *Querier) ExemplarQuerier(ctx context.Context) (storage.ExemplarQuerier, error)

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) Querier added in v0.1.0

func (q *Querier) Querier(mint, maxt int64) (storage.Querier, error)

Querier returns a new Querier on the storage.

func (*Querier) SearchTags

SearchTags performs search by given tags.

func (*Querier) SelectLogs added in v0.1.0

SelectLogs implements logqlengine.Querier.

func (*Querier) SelectSpansets added in v0.0.8

SelectSpansets get spansets from storage.

func (*Querier) TagNames

func (q *Querier) TagNames(ctx context.Context) (r []string, rerr error)

TagNames returns all available tag names.

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

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.

func (Tables) Create

func (t Tables) Create(ctx context.Context, c chClient) error

Create creates tables.

func (*Tables) Each added in v0.1.0

func (t *Tables) Each(cb func(name *string) error) error

Each calls given callback for each table.

func (*Tables) Validate added in v0.1.0

func (t *Tables) Validate() error

Validate checks table names

Jump to

Keyboard shortcuts

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