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

Function mixedArrayTestTrace

tempodb/encoding/vparquet5/block_traceql_test.go:1281–1416  ·  view source on GitHub ↗

mixedArrayTestTrace - similar to the fullyPopulatedTestTrace, but this trace contains attributes that are both flat and array values, within the same attribute key, and configured for dedicated columns. This is to test handling of mixed array/non-array data within an attribute.

()

Source from the content-addressed store, hash-verified

1279// attributes that are both flat and array values, within the same attribute key, and configured
1280// for dedicated columns. This is to test handling of mixed array/non-array data within an attribute.
1281func mixedArrayTestTrace() (*Trace, backend.DedicatedColumns) {
1282 // Testing all types of dedicated columns
1283 dc := []backend.DedicatedColumn{
1284 {
1285 Scope: "resource",
1286 Name: "rs",
1287 Type: "string",
1288 },
1289 {
1290 Scope: "resource",
1291 Name: "ri",
1292 Type: "int",
1293 },
1294 {
1295 Scope: "span",
1296 Name: "ss",
1297 Type: "string",
1298 },
1299 {
1300 Scope: "span",
1301 Name: "si",
1302 Type: "int",
1303 },
1304 {
1305 Scope: "event",
1306 Name: "es",
1307 Type: "string",
1308 },
1309 {
1310 Scope: "event",
1311 Name: "ei",
1312 Type: "int",
1313 },
1314 }
1315
1316 // Populating all types of dedicated columns and mixed array/non-array attributes.
1317 tr := &Trace{
1318 TraceID: test.ValidTraceID(nil),
1319 ResourceSpans: []ResourceSpans{
1320 {
1321 Resource: Resource{
1322 ServiceName: "flat",
1323 Attrs: []Attribute{
1324 attr("rs-generic", "a"),
1325 attr("ri-generic", 1),
1326 },
1327 DedicatedAttributes: DedicatedAttributes{
1328 String01: []string{"a"},
1329 Int01: []int64{1},
1330 },
1331 },
1332 ScopeSpans: []ScopeSpans{
1333 {
1334 SpanCount: 1,
1335 Spans: []Span{
1336 {
1337 SpanID: []byte{},
1338 ParentSpanID: []byte{},

Callers 2

TestFetchTagValuesFunction · 0.85

Calls 2

ValidTraceIDFunction · 0.92
attrFunction · 0.70

Tested by

no test coverage detected