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

Function searchTestSuite

tempodb/tempodb_search_test.go:2359–2474  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2357}
2358
2359func searchTestSuite() (
2360 searchesThatMatch []*tempopb.SearchRequest,
2361 searchesThatDontMatch []*tempopb.SearchRequest,
2362) {
2363 // Matches
2364 searchesThatMatch = []*tempopb.SearchRequest{
2365 {
2366 // Empty request
2367 },
2368 {
2369 MinDurationMs: 999,
2370 MaxDurationMs: 2001,
2371 },
2372 {
2373 Start: 1000,
2374 End: 2000,
2375 },
2376 {
2377 // Overlaps start
2378 Start: 999,
2379 End: 1001,
2380 },
2381 {
2382 // Overlaps end
2383 Start: 1001,
2384 End: 1002,
2385 },
2386
2387 // Well-known resource attributes
2388 makeReq("service.name", "MyService"),
2389 makeReq("cluster", "MyCluster"),
2390 makeReq("namespace", "MyNamespace"),
2391 makeReq("pod", "MyPod"),
2392 makeReq("container", "MyContainer"),
2393 makeReq("k8s.cluster.name", "k8sCluster"),
2394 makeReq("k8s.namespace.name", "k8sNamespace"),
2395 makeReq("k8s.pod.name", "k8sPod"),
2396 makeReq("k8s.container.name", "k8sContainer"),
2397 makeReq("root.service.name", "RootService"),
2398 makeReq("root.name", "RootSpan"),
2399
2400 // Well-known span attributes
2401 makeReq("name", "MySpan"),
2402 makeReq("http.method", "Get"),
2403 makeReq("http.url", "url/Hello/World"),
2404 makeReq("status.code", "error"),
2405
2406 // Dedicated attributes
2407 makeReq("res-dedicated.01", "res-1a"),
2408 makeReq("res-dedicated.02", "res-2b"),
2409 makeReq("span-dedicated.01", "span-1a"),
2410 makeReq("span-dedicated.02", "span-2b"),
2411
2412 // Span attributes
2413 makeReq("foo", "Bar"),
2414 // Resource attributes
2415 makeReq("bat", "Baz"),
2416

Callers 1

Calls 2

addTraceQLFunction · 0.85
makeReqFunction · 0.70

Tested by

no test coverage detected