tracing

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceOtel  = "otel"
	SourceAgent = "agent"
)

Variables

This section is empty.

Functions

func GuessService added in v0.20.0

func GuessService(services []string, appId model.ApplicationId) string

Types

type ClickhouseClient

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

func NewClickhouseClient

func NewClickhouseClient(config ClickhouseClientConfig) (*ClickhouseClient, error)

func (*ClickhouseClient) GetContainerLogs added in v0.20.0

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

func (*ClickhouseClient) GetContainerLogsHistogram added in v0.20.0

func (c *ClickhouseClient) 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 (*ClickhouseClient) GetInboundSpans

func (c *ClickhouseClient) GetInboundSpans(ctx context.Context, listens []model.Listen, ignoredContainerIds []string, tsFrom, tsTo timeseries.Time, durFrom, durTo time.Duration, errors bool, limit int) ([]*Span, error)

func (*ClickhouseClient) GetParentSpans

func (c *ClickhouseClient) GetParentSpans(ctx context.Context, spans []*Span) ([]*Span, error)

func (*ClickhouseClient) GetServiceLogs added in v0.20.0

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

func (*ClickhouseClient) GetServiceLogsHistogram added in v0.20.0

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

func (*ClickhouseClient) GetServicesFromLogs added in v0.20.0

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

func (*ClickhouseClient) GetServicesFromTraces added in v0.20.0

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

func (*ClickhouseClient) GetSpansByServiceName

func (c *ClickhouseClient) GetSpansByServiceName(ctx context.Context, name string, ignoredPeerAddrs []string, tsFrom, tsTo timeseries.Time, durFrom, durTo time.Duration, errors bool, limit int) ([]*Span, error)

func (*ClickhouseClient) GetSpansByTraceId

func (c *ClickhouseClient) GetSpansByTraceId(ctx context.Context, traceId string) ([]*Span, error)

func (*ClickhouseClient) Ping

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

type ClickhouseClientConfig

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

func NewClickhouseClientConfig

func NewClickhouseClientConfig(address, user, password string) ClickhouseClientConfig

type LogEntry added in v0.20.0

type LogEntry struct {
	Timestamp          time.Time
	Severity           string
	Body               string
	TraceId            string
	LogAttributes      map[string]string
	ResourceAttributes map[string]string
}

type Source added in v0.20.0

type Source string

type Span

type Span struct {
	Timestamp     time.Time
	Name          string
	TraceId       string
	SpanId        string
	ParentSpanId  string
	ServiceName   string
	Duration      time.Duration
	StatusCode    string
	StatusMessage string
	Attributes    map[string]string
	Events        []SpanEvent
}

type SpanEvent added in v0.20.0

type SpanEvent struct {
	Timestamp  time.Time
	Name       string
	Attributes map[string]string
}

Jump to

Keyboard shortcuts

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