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

Function findFirstAttribute

tempodb/wal/wal_test.go:296–308  ·  view source on GitHub ↗
(obj *tempopb.Trace)

Source from the content-addressed store, hash-verified

294}
295
296func findFirstAttribute(obj *tempopb.Trace) (string, string) {
297 for _, b := range obj.ResourceSpans {
298 for _, s := range b.ScopeSpans {
299 for _, span := range s.Spans {
300 for _, a := range span.Attributes {
301 return a.Key, a.Value.GetStringValue()
302 }
303 }
304 }
305 }
306
307 return "", ""
308}
309
310func TestInvalidFilesAndFoldersAreHandled(t *testing.T) {
311 tempDir := t.TempDir()

Callers 3

testSearchFunction · 0.85
testFetchFunction · 0.85
BenchmarkSearchFunction · 0.85

Calls 1

GetStringValueMethod · 0.80

Tested by

no test coverage detected