Skip to content

Instantly share code, notes, and snippets.

@AdheipSingh
Created January 29, 2020 15:35
Show Gist options
  • Save AdheipSingh/3610db4e95efad1e1464714e19d22e15 to your computer and use it in GitHub Desktop.
Save AdheipSingh/3610db4e95efad1e1464714e19d22e15 to your computer and use it in GitHub Desktop.
Trace represents as user defined data type
type Trace struct {
Data []struct {
TraceID string `json:"traceID"`
Spans []struct {
TraceID string `json:"traceID"`
SpanID string `json:"spanID"`
OperationName string `json:"operationName"`
References []interface{} `json:"references"`
StartTime int64 `json:"startTime"`
Duration int `json:"duration"`
Tags []struct {
Key string `json:"key"`
Type string `json:"type"`
Value string `json:"value"`
} `json:"tags"`
Logs []interface{} `json:"logs"`
ProcessID string `json:"processID"`
Warnings interface{} `json:"warnings"`
} `json:"spans"`
Processes struct {
P1 struct {
ServiceName string `json:"serviceName"`
Tags []struct {
Key string `json:"key"`
Type string `json:"type"`
Value int `json:"value"`
} `json:"tags"`
} `json:"p1"`
P2 struct {
ServiceName string `json:"serviceName"`
Tags []struct {
Key string `json:"key"`
Type string `json:"type"`
Value int `json:"value"`
} `json:"tags"`
} `json:"p2"`
P3 struct {
ServiceName string `json:"serviceName"`
Tags []struct {
Key string `json:"key"`
Type string `json:"type"`
Value int `json:"value"`
} `json:"tags"`
} `json:"p3"`
P4 struct {
ServiceName string `json:"serviceName"`
Tags []struct {
Key string `json:"key"`
Type string `json:"type"`
Value int `json:"value"`
} `json:"tags"`
} `json:"p4"`
} `json:"processes"`
Warnings interface{} `json:"warnings"`
} `json:"data"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Errors interface{} `json:"errors"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment