Documentation ¶
Index ¶
- Constants
- Variables
- func CopyBlock(ctx context.Context, meta *backend.BlockMeta, from backend.Reader, ...) error
- func CreateBlock(ctx context.Context, cfg *common.BlockConfig, meta *backend.BlockMeta, ...) (*backend.BlockMeta, error)
- func SortTrace(t *Trace)
- type Attribute
- type BackendReaderAt
- type Combiner
- type Compactor
- type Encoding
- func (v Encoding) CopyBlock(ctx context.Context, meta *backend.BlockMeta, from backend.Reader, ...) error
- func (v Encoding) CreateBlock(ctx context.Context, cfg *common.BlockConfig, meta *backend.BlockMeta, ...) (*backend.BlockMeta, error)
- func (v Encoding) NewCompactor(opts common.CompactionOptions) common.Compactor
- func (v Encoding) OpenBlock(meta *backend.BlockMeta, r backend.Reader) (common.BackendBlock, error)
- func (v Encoding) Version() string
- type Event
- type EventAttribute
- type IL
- type ILS
- type Iterator
- type MultiBlockIterator
- type RawIterator
- type Resource
- type ResourceSpans
- type RowTracker
- type Span
- type Trace
Constants ¶
View Source
const ( SearchPrevious = -1 SearchNext = -2 NotFound = -3 TraceIDColumnName = "TraceID" )
View Source
const ( LabelName = "name" StatusCodeTag = "status.code" StatusCodeUnset = "unset" StatusCodeOK = "ok" StatusCodeError = "error" )
These are reserved search parameters
View Source
const ( LabelRootSpanName = "root.name" LabelRootServiceName = "root.service.name" LabelServiceName = "service.name" LabelCluster = "cluster" LabelNamespace = "namespace" LabelPod = "pod" LabelContainer = "container" LabelK8sClusterName = "k8s.cluster.name" LabelK8sNamespaceName = "k8s.namespace.name" LabelK8sPodName = "k8s.pod.name" LabelK8sContainerName = "k8s.container.name" LabelHTTPMethod = "http.method" LabelHTTPUrl = "http.url" LabelHTTPStatusCode = "http.status_code" )
View Source
const (
DataFileName = "data.parquet"
)
View Source
const DefinitionLevelResourceAttrs = 2
View Source
const DefinitionLevelResourceSpans = 1
View Source
const DefinitionLevelResourceSpansILSSpan = 3
View Source
const DefinitionLevelTrace = 0
View Source
const VersionString = "vParquet"
Variables ¶
View Source
var StatusCodeMapping = map[string]int{ StatusCodeUnset: int(v1.Status_STATUS_CODE_UNSET), StatusCodeOK: int(v1.Status_STATUS_CODE_OK), StatusCodeError: int(v1.Status_STATUS_CODE_ERROR), }
Functions ¶
func CreateBlock ¶
Types ¶
type Attribute ¶
type Attribute struct { Key string `parquet:",snappy,dict"` // This is a bad design that leads to millions of null values. How can we fix this? Value *string `parquet:",dict,snappy,optional"` ValueInt *int64 `parquet:",snappy,optional"` ValueDouble *float64 `parquet:",snappy,optional"` ValueBool *bool `parquet:",snappy,optional"` ValueKVList string `parquet:",snappy,optional"` ValueArray string `parquet:",snappy,optional"` }
type BackendReaderAt ¶
type BackendReaderAt struct { TotalBytesRead uint64 // contains filtered or unexported fields }
func NewBackendReaderAt ¶
func (*BackendReaderAt) ReadAtWithCache ¶
func (b *BackendReaderAt) ReadAtWithCache(p []byte, off int64) (int, error)
type Combiner ¶
type Combiner struct {
// contains filtered or unexported fields
}
Combiner combines multiple partial traces into one, deduping spans based on ID and kind. Note that it is destructive. There are design decisions for efficiency: * Only scan/hash the spans for each input once, which is reused across calls. * Only sort the final result once and if needed. * Don't scan/hash the spans for the last input (final=true).
func NewCombiner ¶
func NewCombiner() *Combiner
func (*Combiner) ConsumeWithFinal ¶
ConsumeWithFinal consumes the trace, but allows for performance savings when it is known that this is the last expected input trace.
type Compactor ¶
type Compactor struct {
// contains filtered or unexported fields
}
func NewCompactor ¶
func NewCompactor(opts common.CompactionOptions) *Compactor
type Encoding ¶
type Encoding struct{}
func (Encoding) CreateBlock ¶
func (Encoding) NewCompactor ¶
func (v Encoding) NewCompactor(opts common.CompactionOptions) common.Compactor
type Event ¶
type Event struct { TimeUnixNano uint64 `parquet:",delta"` Name string `parquet:",snappy"` Attrs []EventAttribute `parquet:""` DroppedAttributesCount int32 `parquet:",snappy,delta"` Test string `parquet:",snappy,dict,optional"` // Always empty for testing }
type EventAttribute ¶
type MultiBlockIterator ¶
type MultiBlockIterator struct {
// contains filtered or unexported fields
}
func (*MultiBlockIterator) Close ¶
func (m *MultiBlockIterator) Close()
type RawIterator ¶
type Resource ¶
type Resource struct { Attrs []Attribute // Known attributes ServiceName string `parquet:",snappy,dict"` Cluster *string `parquet:",snappy,optional,dict"` Namespace *string `parquet:",snappy,optional,dict"` Pod *string `parquet:",snappy,optional,dict"` Container *string `parquet:",snappy,optional,dict"` K8sClusterName *string `parquet:",snappy,optional,dict"` K8sNamespaceName *string `parquet:",snappy,optional,dict"` K8sPodName *string `parquet:",snappy,optional,dict"` K8sContainerName *string `parquet:",snappy,optional,dict"` Test string `parquet:",snappy,dict,optional"` // Always empty for testing }
type ResourceSpans ¶
type RowTracker ¶
type RowTracker struct {
// contains filtered or unexported fields
}
type Span ¶
type Span struct { // ID is []byte to save space. It doesn't need to be user // friendly like trace ID, and []byte is half the size of string. ID []byte `parquet:","` Name string `parquet:",snappy,dict"` Kind int `parquet:",delta"` ParentSpanID []byte `parquet:","` TraceState string `parquet:",snappy"` StartUnixNanos uint64 `parquet:",delta"` EndUnixNanos uint64 `parquet:",delta"` StatusCode int `parquet:",delta"` StatusMessage string `parquet:",snappy"` Attrs []Attribute `parquet:""` DroppedAttributesCount int32 `parquet:",snappy"` Events []Event `parquet:""` DroppedEventsCount int32 `parquet:",snappy"` // Known attributes HttpMethod *string `parquet:",snappy,optional,dict"` HttpUrl *string `parquet:",snappy,optional,dict"` HttpStatusCode *int64 `parquet:",snappy,optional"` }
nolint:revive Ignore field naming warnings
type Trace ¶
type Trace struct { // TraceID is a byte slice as it helps maintain the sort order of traces within a parquet file TraceID []byte `parquet:""` ResourceSpans []ResourceSpans `parquet:"rs"` // TraceIDText is for better useability on downstream systems i.e: something other than Tempo is reading these files. // It will not be used as the primary traceID field within Tempo and is only helpful for debugging purposes. TraceIDText string `parquet:",snappy"` // Trace-level attributes for searching StartTimeUnixNano uint64 `parquet:",delta"` EndTimeUnixNano uint64 `parquet:",delta"` DurationNanos uint64 `parquet:",delta"` RootServiceName string `parquet:",dict"` RootSpanName string `parquet:",dict"` }
func CombineTraces ¶
Click to show internal directories.
Click to hide internal directories.