MCPcopy
hub / github.com/grafana/tempo / traceToParquet

Function traceToParquet

tempodb/encoding/vparquet5/schema.go:382–389  ·  view source on GitHub ↗

traceToParquet converts a tempopb.Trace to this schema's object model. Returns the new object and a bool indicating if it's a connected trace or not

(meta *backend.BlockMeta, id common.ID, tr *tempopb.Trace, ot *Trace)

Source from the content-addressed store, hash-verified

380// traceToParquet converts a tempopb.Trace to this schema's object model. Returns the new object and
381// a bool indicating if it's a connected trace or not
382func traceToParquet(meta *backend.BlockMeta, id common.ID, tr *tempopb.Trace, ot *Trace) (*Trace, bool) {
383 // Dedicated attribute column assignments
384 dedicatedResourceAttributes := dedicatedColumnsToColumnMapping(meta.DedicatedColumns, backend.DedicatedColumnScopeResource)
385 dedicatedSpanAttributes := dedicatedColumnsToColumnMapping(meta.DedicatedColumns, backend.DedicatedColumnScopeSpan)
386 dedicatedEventAttributes := dedicatedColumnsToColumnMapping(meta.DedicatedColumns, backend.DedicatedColumnScopeEvent)
387
388 return traceToParquetWithMapping(id, tr, ot, dedicatedResourceAttributes, dedicatedSpanAttributes, dedicatedEventAttributes)
389}
390
391func traceToParquetWithMapping(id common.ID, tr *tempopb.Trace, ot *Trace, dedicatedResourceAttributes, dedicatedSpanAttributes, dedicatedEventAttributes dedicatedColumnMapping) (*Trace, bool) {
392 if ot == nil {

Callers 15

BenchmarkCombineFunction · 0.70
BenchmarkSortTraceFunction · 0.70
TestBackendBlockSearchFunction · 0.70
TestProtoParquetRandoFunction · 0.70
TestFieldsAreClearedFunction · 0.70
TestTraceToParquetFunction · 0.70
BenchmarkProtoToParquetFunction · 0.70
BenchmarkDeconstructFunction · 0.70

Calls 2

Tested by 15

BenchmarkCombineFunction · 0.56
BenchmarkSortTraceFunction · 0.56
TestBackendBlockSearchFunction · 0.56
TestProtoParquetRandoFunction · 0.56
TestFieldsAreClearedFunction · 0.56
TestTraceToParquetFunction · 0.56
BenchmarkProtoToParquetFunction · 0.56
BenchmarkDeconstructFunction · 0.56