github.com/kiali/kiali@v1.84.0/tracing/otel/model/types.go (about) 1 package model 2 3 import ( 4 "time" 5 6 "github.com/kiali/kiali/tracing/otel/model/json" 7 ) 8 9 // Trace is a list of spans 10 type TraceMetadata struct { 11 TraceID string `json:"traceID"` 12 RootServiceName string `json:"RootServiceName"` 13 StartTimeUnixNano string `json:"startTimeUnixNano"` 14 DurationMs time.Duration `json:"durationMs"` 15 } 16 17 type TracingResponse struct { 18 Traces []TraceMetadata `json:"traces"` 19 } 20 21 type TagsResponse struct { 22 TagNames []string `json:"tagNames"` 23 } 24 25 type Span struct { 26 SpanID string `json:"spanID"` 27 StartTimeUnixNano string `json:"startTimeUnixNano"` 28 DurationNanos string `json:"durationNanos"` 29 Attributes []json.Attribute `json:"attributes"` 30 Status json.Status `json:"status"` 31 } 32 33 type SpanSet struct { 34 Spans []Span `json:"spans"` 35 Matched int `json:"matched"` // Tempo returns the number of total spans matched in this field 36 } 37 38 type Trace struct { 39 TraceID string `json:"traceID"` 40 RootServiceName string `json:"rootServiceName"` 41 RootTraceName string `json:"rootTraceName,omitempty"` 42 StartTimeUnixNano string `json:"startTimeUnixNano"` 43 DurationMs int `json:"durationMs"` 44 SpanSet SpanSet `json:"spanSet"` 45 } 46 47 type Traces struct { 48 Traces []Trace `json:"traces"` 49 Metrics struct{} `json:"metrics"` 50 } 51 52 type TracesError struct { 53 Status string `json:"status"` 54 Error string `json:"error"` 55 }