github.com/kiali/kiali@v1.84.0/tracing/jaeger/model.proto (about) 1 // Copyright (c) 2018 Uber Technologies, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 16 // Adapted for pure Kiali client 17 syntax="proto3"; 18 19 package jaeger.api_v2; 20 21 import "google/protobuf/timestamp.proto"; 22 import "google/protobuf/duration.proto"; 23 24 // TODO: document all types and fields 25 26 // TODO: once this moves to jaeger-idl repo, we may want to change Go pkg to api_v2 27 // and rewrite it to model only in this repo. That should make it easier to generate 28 // classes in other languages. 29 option go_package = ".;model"; 30 31 enum ValueType { 32 STRING = 0; 33 BOOL = 1; 34 INT64 = 2; 35 FLOAT64 = 3; 36 BINARY = 4; 37 }; 38 39 message KeyValue { 40 string key = 1; 41 ValueType v_type = 2; 42 string v_str = 3; 43 bool v_bool = 4; 44 int64 v_int64 = 5; 45 double v_float64 = 6; 46 bytes v_binary = 7; 47 } 48 49 message Log { 50 google.protobuf.Timestamp timestamp = 1; 51 repeated KeyValue fields = 2; 52 } 53 54 enum SpanRefType { 55 CHILD_OF = 0; 56 FOLLOWS_FROM = 1; 57 }; 58 59 message SpanRef { 60 bytes trace_id = 1; 61 bytes span_id = 2; 62 SpanRefType ref_type = 3; 63 } 64 65 message Process { 66 string service_name = 1; 67 repeated KeyValue tags = 2; 68 } 69 70 message Span { 71 bytes trace_id = 1; 72 bytes span_id = 2; 73 string operation_name = 3; 74 repeated SpanRef references = 4; 75 uint32 flags = 5; 76 google.protobuf.Timestamp start_time = 6; 77 google.protobuf.Duration duration = 7; 78 repeated KeyValue tags = 8; 79 repeated Log logs = 9; 80 Process process = 10; 81 string process_id = 11; 82 repeated string warnings = 12; 83 } 84 85 message Trace { 86 message ProcessMapping { 87 string process_id = 1; 88 Process process = 2; 89 } 90 repeated Span spans = 1; 91 repeated ProcessMapping process_map = 2; 92 repeated string warnings = 3; 93 } 94 95 // Note that both Span and Batch may contain a Process. 96 // This is different from the Thrift model which was only used 97 // for transport, because Proto model is also used by the backend 98 // as the domain model, where once a batch is received it is split 99 // into individual spans which are all processed independently, 100 // and therefore they all need a Process. As far as on-the-wire 101 // semantics, both Batch and Spans in the same message may contain 102 // their own instances of Process, with span.Process taking priority 103 // over batch.Process. 104 message Batch { 105 repeated Span spans = 1; 106 Process process = 2; 107 } 108 109 message DependencyLink { 110 string parent = 1; 111 string child = 2; 112 uint64 call_count = 3; 113 string source = 4; 114 }