store

package
v0.0.0-...-6ee8545 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.

Index

Constants

View Source
const (

	// Keys used to represent OTLP constructs from Jaeger tags which are then dropped from the tag map.
	TagError         = "error"
	TagHostname      = "hostname"
	TagJaegerVersion = "jaeger.version"
	TagSpanKind      = "span.kind"
	TagW3CTraceState = "w3c.tracestate"
	TagEventName     = "event"
)
View Source
const (
	DefaultMaxTraceDuration = time.Hour
)
View Source
const MEDIA_TYPE_ENCODED_BINARY = "data:application/octet-stream; base64,"
View Source
const MEDIA_TYPE_ENCODED_BINARY_LEN = len(MEDIA_TYPE_ENCODED_BINARY)

Variables

View Source
var DefaultConfig = Config{
	MaxTraceDuration:    DefaultMaxTraceDuration,
	StreamingSpanWriter: true,
}

Functions

func FindTagInfo

func FindTagInfo(ctx context.Context, q *spanstore.TraceQueryParameters, conn pgxconn.PgxConn) (*tagsInfo, error)

func ProtoFromTraces

func ProtoFromTraces(traces ptrace.Traces) ([]*model.Batch, error)

func ProtoToTraces

func ProtoToTraces(span *model.Span) (ptrace.Traces, error)

func RegisterTelemetryMetrics

func RegisterTelemetryMetrics(t telemetry.Engine) error

func ScanRow

func ScanRow(row pgxconn.PgxRows, traces *ptrace.Traces) error

func Validate

func Validate(cfg *Config) error

Types

type Builder

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

func NewBuilder

func NewBuilder(cfg *Config) *Builder

func (*Builder) BuildTraceIDSubquery

func (b *Builder) BuildTraceIDSubquery(q *spanstore.TraceQueryParameters, tInfo *tagsInfo) (string, []interface{})

func (*Builder) BuildTraceTimeRangeSubqueryForTraceID

func (b *Builder) BuildTraceTimeRangeSubqueryForTraceID(traceID pgtype.UUID) (string, []interface{})

type Config

type Config struct {
	MaxTraceDuration    time.Duration
	StreamingSpanWriter bool
}

func ParseFlags

func ParseFlags(fs *flag.FlagSet, cfg *Config) *Config

type Store

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

func New

func New(conn pgxconn.PgxConn, inserter ingestor.DBInserter, cfg *Config) *Store

func (*Store) Close

func (p *Store) Close() error

Close performs graceful shutdown of SpanWriter on Jaeger collector shutdown. In our case we have nothing to do Noop impl avoid getting GRPC error message when Jaeger collector shuts down.

func (*Store) DependencyReader

func (p *Store) DependencyReader() dependencystore.Reader

func (*Store) FindTraceIDs

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

func (*Store) FindTraces

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

func (*Store) GetBuilder

func (p *Store) GetBuilder() *Builder

func (*Store) GetDependencies

func (p *Store) GetDependencies(ctx context.Context, endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error)

func (*Store) GetOperations

func (p *Store) GetOperations(ctx context.Context, query spanstore.OperationQueryParameters) ([]spanstore.Operation, error)

func (*Store) GetServices

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

func (*Store) GetTrace

func (p *Store) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)

func (*Store) SpanReader

func (p *Store) SpanReader() spanstore.Reader

func (*Store) SpanWriter

func (p *Store) SpanWriter() spanstore.Writer

func (*Store) StreamingSpanWriter

func (p *Store) StreamingSpanWriter() spanstore.Writer

func (*Store) WriteSpan

func (p *Store) 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