clickhouse

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config ClientConfig) (*Client, error)

func (*Client) GetContainerLogs

func (c *Client) GetContainerLogs(ctx context.Context, from, to timeseries.Time, containers map[string][]string, severities []string, hashes []string, search string, limit int) ([]*model.LogEntry, error)

func (*Client) GetContainerLogsHistogram

func (c *Client) GetContainerLogsHistogram(ctx context.Context, from, to timeseries.Time, step timeseries.Duration, containers map[string][]string, severities []string, hashes []string, search string) (map[string]*timeseries.TimeSeries, error)

func (*Client) GetInboundSpans

func (c *Client) GetInboundSpans(ctx context.Context, q SpanQuery, clients []string, listens []model.Listen) ([]*model.TraceSpan, error)

func (*Client) GetInboundSpansHistogram added in v0.29.4

func (c *Client) GetInboundSpansHistogram(ctx context.Context, q SpanQuery, clients []string, listens []model.Listen) ([]model.HistogramBucket, error)

func (*Client) GetParentSpans

func (c *Client) GetParentSpans(ctx context.Context, spans []*model.TraceSpan) ([]*model.TraceSpan, error)

func (*Client) GetProfile

func (c *Client) GetProfile(ctx context.Context, from, to timeseries.Time, services []string, typ model.ProfileType, diff bool) (*model.FlameGraphNode, error)

func (*Client) GetProfileTypes

func (c *Client) GetProfileTypes(ctx context.Context) (map[string][]model.ProfileType, error)

func (*Client) GetRootSpans added in v1.0.0

func (c *Client) GetRootSpans(ctx context.Context, q SpanQuery) ([]*model.TraceSpan, error)

func (*Client) GetRootSpansHistogram added in v1.0.0

func (c *Client) GetRootSpansHistogram(ctx context.Context, q SpanQuery) ([]model.HistogramBucket, error)

func (*Client) GetRootSpansSummary added in v1.0.0

func (c *Client) GetRootSpansSummary(ctx context.Context, q SpanQuery) (*model.TraceSpanSummary, error)

func (*Client) GetServiceLogs

func (c *Client) GetServiceLogs(ctx context.Context, from, to timeseries.Time, service string, severities []string, search string, limit int) ([]*model.LogEntry, error)

func (*Client) GetServiceLogsHistogram

func (c *Client) GetServiceLogsHistogram(ctx context.Context, from, to timeseries.Time, step timeseries.Duration, service string, severities []string, search string) (map[string]*timeseries.TimeSeries, error)

func (*Client) GetServicesFromLogs

func (c *Client) GetServicesFromLogs(ctx context.Context) (map[string][]string, error)

func (*Client) GetServicesFromTraces

func (c *Client) GetServicesFromTraces(ctx context.Context) ([]string, error)

func (*Client) GetSpanAttrStats added in v1.0.0

func (c *Client) GetSpanAttrStats(ctx context.Context, q SpanQuery) ([]model.TraceSpanAttrStats, error)

func (*Client) GetSpansByServiceName

func (c *Client) GetSpansByServiceName(ctx context.Context, q SpanQuery) ([]*model.TraceSpan, error)

func (*Client) GetSpansByServiceNameHistogram added in v0.29.4

func (c *Client) GetSpansByServiceNameHistogram(ctx context.Context, q SpanQuery) ([]model.HistogramBucket, error)

func (*Client) GetSpansByTraceId

func (c *Client) GetSpansByTraceId(ctx context.Context, traceId string) ([]*model.TraceSpan, error)

func (*Client) GetTraceErrors added in v1.0.0

func (c *Client) GetTraceErrors(ctx context.Context, q SpanQuery) ([]model.TraceErrorsStat, error)

func (*Client) GetTraceLatencyProfile added in v1.0.0

func (c *Client) GetTraceLatencyProfile(ctx context.Context, q SpanQuery) (*model.Profile, error)

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

type ClientConfig

type ClientConfig struct {
	Protocol      string
	Address       string
	TlsEnable     bool
	TlsSkipVerify bool
	User          string
	Password      string
	Database      string
	DialContext   func(ctx context.Context, addr string) (net.Conn, error)
}

func NewClientConfig

func NewClientConfig(address, user, password string) ClientConfig

type SpanFilter added in v1.0.6

type SpanFilter struct {
	Field string
	Op    string
	Value string
}

func NewSpanFilter added in v1.0.6

func NewSpanFilter(field, op, value string) SpanFilter

func (SpanFilter) String added in v1.0.6

func (f SpanFilter) String() string

type SpanQuery added in v1.0.0

type SpanQuery struct {
	Ctx timeseries.Context

	TsFrom  timeseries.Time
	TsTo    timeseries.Time
	DurFrom time.Duration
	DurTo   time.Duration
	Errors  bool

	Limit int

	Filters          []SpanFilter
	ExcludePeerAddrs []string

	Diff bool
}

func (SpanQuery) DurationFilter added in v1.0.0

func (q SpanQuery) DurationFilter() (string, []any)

func (SpanQuery) IsSelectionDefined added in v1.0.0

func (q SpanQuery) IsSelectionDefined() bool

func (SpanQuery) RootSpansFilter added in v1.0.0

func (q SpanQuery) RootSpansFilter() ([]string, []any)

func (SpanQuery) SpansByServiceNameFilter added in v1.0.0

func (q SpanQuery) SpansByServiceNameFilter() ([]string, []any)

Jump to

Keyboard shortcuts

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