s3spanstore

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_BATCH_BYTE_SIZE = 1024 * 1024 * 4
	MAX_BATCH_RECORDS   = 500
)

Variables

View Source
var (
	MIN_FLUSH_INTERVAL = 10 * time.Second
)

Functions

This section is empty.

Types

type KinesisAPI

type KinesisAPI interface {
	PutRecordBatch(ctx context.Context, params *firehose.PutRecordBatchInput, optFns ...func(*firehose.Options)) (*firehose.PutRecordBatchOutput, error)
}

type Reader

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

func NewReader

func NewReader(logger hclog.Logger, svc *athena.Client, cfg config.Athena) (*Reader, error)

func (*Reader) FindTraceIDs

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

This method is not used

func (*Reader) FindTraces

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

func (*Reader) GetOperations

func (*Reader) GetServices

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

func (*Reader) GetTrace

func (s *Reader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)

type SpanRecord

type SpanRecord struct {
	TraceID       string                  `json:"traceid"`       // 1
	SpanID        string                  `json:"spanid"`        // 2
	OperationName string                  `json:"operationname"` // 3
	SpanKind      string                  `json:"spankind"`      // 4
	StartTime     int64                   `json:"starttime"`     // 5
	Duration      int64                   `json:"duration"`      // 6
	Tags          map[string]string       `json:"tags"`          // 7
	ServiceName   string                  `json:"servicename"`   // 8
	SpanPayload   string                  `json:"spanpayload"`   // 9
	References    []*SpanRecordReferences `json:"references"`    // 10
}

SpanRecord contains queryable properties from the span and the span as json payload

func NewSpanRecordFromSpan

func NewSpanRecordFromSpan(span *model.Span) (*SpanRecord, error)

type SpanRecordReferences added in v0.0.2

type SpanRecordReferences struct {
	TraceID string `json:"traceid"` // 1
	SpanID  string `json:"spanid"`  // 2
	RefType int64  `json:"reftype"` // 3
}

func NewSpanRecordReferencesFromSpanReferences added in v0.0.2

func NewSpanRecordReferencesFromSpanReferences(span *model.Span) []*SpanRecordReferences

type Writer

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

func NewWriter

func NewWriter(logger hclog.Logger, svc KinesisAPI, firehoseConfig config.Kinesis) (*Writer, error)

func (*Writer) Close added in v0.0.3

func (w *Writer) Close() error

func (*Writer) WriteSpan

func (s *Writer) WriteSpan(ctx context.Context, span *model.Span) error

Jump to

Keyboard shortcuts

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