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

Function anyValueForDedicatedColumn

pkg/util/test/req.go:62–82  ·  view source on GitHub ↗
(col backend.DedicatedColumn, idx int)

Source from the content-addressed store, hash-verified

60}
61
62func anyValueForDedicatedColumn(col backend.DedicatedColumn, idx int) *v1_common.AnyValue {
63 if col.Type == backend.DedicatedColumnTypeInt {
64 return &v1_common.AnyValue{
65 Value: &v1_common.AnyValue_IntValue{
66 IntValue: int64(idx + 1 + rand.Intn(1000)), // nolint:gosec // G404: test RNG
67 },
68 }
69 }
70 if slices.Contains(col.Options, backend.DedicatedColumnOptionBlob) {
71 return &v1_common.AnyValue{
72 Value: &v1_common.AnyValue_StringValue{
73 StringValue: randomDedicatedBlobString(),
74 },
75 }
76 }
77 return &v1_common.AnyValue{
78 Value: &v1_common.AnyValue_StringValue{
79 StringValue: fmt.Sprintf("dedicated-%s-%s-%d", col.Scope, col.Name, rand.Int()), // nolint:gosec // G404
80 },
81 }
82}
83
84func makeSpanWithAttributeCount(traceID []byte, count int, startTime uint64, endTime uint64) *v1_trace.Span {
85 attributes := make([]*v1_common.KeyValue, 0, count)

Callers 1

Calls 2

IntMethod · 0.80

Tested by

no test coverage detected