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