Documentation ¶
Index ¶
- Constants
- Variables
- func ContextWithBearerToken(ctx context.Context, token string) context.Context
- func GetBearerToken(ctx context.Context) (string, bool)
- type CompositeWriter
- type DownsamplingOptions
- type DownsamplingWriter
- type Operation
- type OperationQueryParameters
- type Reader
- type Sampler
- type TraceQueryParameters
- type Writer
Constants ¶
const BearerTokenKey = "bearer.token"
BearerTokenKey is the string literal used internally in the implementation of this context.
const StoragePropagationKey = "storage.propagate.token"
StoragePropagationKey is a key for viper configuration to pass this option to storage plugins.
Variables ¶
var ( // ErrTraceNotFound is returned by Reader's GetTrace if no data is found for given trace ID. ErrTraceNotFound = errors.New("trace not found") )
Functions ¶
func ContextWithBearerToken ¶
ContextWithBearerToken set bearer token in context
Types ¶
type CompositeWriter ¶
type CompositeWriter struct {
// contains filtered or unexported fields
}
CompositeWriter is a span Writer that tries to save spans into several underlying span Writers
func NewCompositeWriter ¶
func NewCompositeWriter(spanWriters ...Writer) *CompositeWriter
NewCompositeWriter creates a CompositeWriter
type DownsamplingOptions ¶
DownsamplingOptions contains the options for constructing a DownsamplingWriter.
type DownsamplingWriter ¶
type DownsamplingWriter struct {
// contains filtered or unexported fields
}
DownsamplingWriter is a span Writer that drops spans with a predefined downsamplingRatio.
func NewDownsamplingWriter ¶
func NewDownsamplingWriter(spanWriter Writer, downsamplingOptions DownsamplingOptions) *DownsamplingWriter
NewDownsamplingWriter creates a DownsamplingWriter.
type OperationQueryParameters ¶
OperationQueryParameters contains parameters of query operations, empty spanKind means get operations for all kinds of span.
type Reader ¶
type Reader interface { GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) GetServices(ctx context.Context) ([]string, error) GetOperations(ctx context.Context, query OperationQueryParameters) ([]Operation, error) FindTraces(ctx context.Context, query *TraceQueryParameters) ([]*model.Trace, error) FindTraceIDs(ctx context.Context, query *TraceQueryParameters) ([]model.TraceID, error) }
Reader finds and loads traces and other data from storage.
type Sampler ¶
type Sampler struct {
// contains filtered or unexported fields
}
Sampler decides if we should sample a span
func NewSampler ¶
NewSampler creates SamplingExecutor