github.com/kiali/kiali@v1.84.0/tracing/otel/model/json/model.go (about)

     1  package json
     2  
     3  // OTEL
     4  
     5  type ValueString struct {
     6  	StringValue string `json:"stringValue"`
     7  }
     8  
     9  type Attribute struct {
    10  	Key   string      `json:"key"`
    11  	Value ValueString `json:"value"`
    12  }
    13  
    14  type Event struct {
    15  	TimeUnixNano string `json:"timeUnixNano"`
    16  	Name         string `json:"name"`
    17  }
    18  
    19  type Status struct {
    20  	Code string `json:"code"`
    21  }
    22  
    23  type Span struct {
    24  	TraceID           string      `json:"traceId"`
    25  	SpanID            string      `json:"spanId"`
    26  	Name              string      `json:"name"`
    27  	Kind              string      `json:"kind"`
    28  	StartTimeUnixNano string      `json:"startTimeUnixNano"`
    29  	EndTimeUnixNano   string      `json:"endTimeUnixNano"`
    30  	Attributes        []Attribute `json:"attributes"`
    31  	Events            []Event     `json:"events"`
    32  	Status            Status      `json:"status"`
    33  	ParentSpanId      string      `json:"parentSpanId"`
    34  }
    35  
    36  type ScopeSpan struct {
    37  	Scope struct{} `json:"scope"`
    38  	Spans []Span   `json:"spans"`
    39  }
    40  
    41  type Resource struct {
    42  	Attributes []Attribute `json:"attributes"`
    43  }
    44  
    45  type Batch struct {
    46  	Resource   Resource    `json:"resource"`
    47  	ScopeSpans []ScopeSpan `json:"scopeSpans"`
    48  }
    49  
    50  type Data struct {
    51  	Batches []Batch `json:"batches"`
    52  }