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

Method pushBytes

modules/blockbuilder/partition_writer.go:63–83  ·  view source on GitHub ↗
(ts time.Time, tenant string, req *tempopb.PushBytesRequest)

Source from the content-addressed store, hash-verified

61}
62
63func (p *writer) pushBytes(ts time.Time, tenant string, req *tempopb.PushBytesRequest) error {
64 level.Debug(p.logger).Log(
65 "msg", "pushing bytes",
66 "tenant", tenant,
67 "num_traces", len(req.Traces),
68 "id", idsToString(req.Ids),
69 )
70
71 i, err := p.instanceForTenant(tenant)
72 if err != nil {
73 return err
74 }
75
76 for j, trace := range req.Traces {
77 if err := i.AppendTrace(req.Ids[j], trace.Slice, ts); err != nil {
78 return err
79 }
80 }
81
82 return nil
83}
84
85func (p *writer) flush(ctx context.Context, r tempodb.Reader, w tempodb.Writer, c tempodb.Compactor) error {
86 // TODO - Retry with backoff?

Callers

nothing calls this directly

Calls 4

instanceForTenantMethod · 0.95
idsToStringFunction · 0.85
LogMethod · 0.65
AppendTraceMethod · 0.65

Tested by

no test coverage detected