spanstore

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWorkspace  = "tracing"
	DefaultSpans      = "spans"
	DefaultOperations = "operations"
	DefaultRetention  = 7 * 24 * 60 * 60 // 7 days
	DefaultWorkers    = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Workspace     string `yaml:"workspace"`
	Spans         string `yaml:"spans"`
	Operations    string `yaml:"operations"`
	Workers       uint64 `yaml:"workers"`
	Create        bool   `yaml:"create"`
	RetentionSecs int64  `yaml:"retention_secs"`
}

func (*Config) SetDefaults

func (c *Config) SetDefaults()

type Operation

type Operation struct {
	ID        string `json:"_id"`
	Service   string `json:"service"`
	Operation string `json:"operation"`
	Kind      string `json:"span_kind"`
}

type Span added in v0.0.9

type Span struct {
	model.Span
	KV map[string]string `json:"kv"`
}

type Store

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

func New

func New(logger hclog.Logger, rc *rockset.RockClient, config Config) (*Store, error)

func (Store) Close

func (s Store) Close() error

func (Store) FindTraceIDs

func (s Store) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)

func (Store) FindTraces

func (s Store) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)

func (Store) GetOperations

func (Store) GetServices

func (s Store) GetServices(ctx context.Context) ([]string, error)

func (Store) GetTrace

func (s Store) GetTrace(ctx context.Context, tid model.TraceID) (*model.Trace, error)

func (Store) Setup

func (s Store) Setup() error

func (Store) WriteSpan

func (s Store) WriteSpan(_ context.Context, span *model.Span) error

Jump to

Keyboard shortcuts

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