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

Function pushTrace

modules/livestore/instance_test.go:39–47  ·  view source on GitHub ↗
(ctx context.Context, t *testing.T, instance *instance, tr *tempopb.Trace, id []byte)

Source from the content-addressed store, hash-verified

37}
38
39func pushTrace(ctx context.Context, t *testing.T, instance *instance, tr *tempopb.Trace, id []byte) {
40 b, err := tr.Marshal()
41 require.NoError(t, err)
42 req := &tempopb.PushBytesRequest{
43 Traces: []tempopb.PreallocBytes{{Slice: b}},
44 Ids: [][]byte{id},
45 }
46 instance.pushBytes(ctx, time.Now(), req)
47}
48
49// TestInstanceLimits verifies MaxBytesPerTrace and MaxLocalTracesPerUser enforcement in livestore.
50func TestInstanceLimits(t *testing.T) {

Calls 3

MarshalMethod · 0.65
pushBytesMethod · 0.65
NowMethod · 0.65

Tested by

no test coverage detected