-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathzipkinCore.thrift
81 lines (74 loc) · 2.13 KB
/
zipkinCore.thrift
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 2012 Twitter Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
namespace java com.twitter.zipkin.thriftjava
#@namespace scala com.twitter.zipkin.thriftscala
namespace rb Zipkin
#************** Annotation.value **************
const string CLIENT_SEND = "cs"
const string CLIENT_RECV = "cr"
const string SERVER_SEND = "ss"
const string SERVER_RECV = "sr"
const string WIRE_SEND = "ws"
const string WIRE_RECV = "wr"
const string CLIENT_SEND_FRAGMENT = "csf"
const string CLIENT_RECV_FRAGMENT = "crf"
const string SERVER_SEND_FRAGMENT = "ssf"
const string SERVER_RECV_FRAGMENT = "srf"
#***** BinaryAnnotation.key ******
const string HTTP_HOST = "http.host"
const string HTTP_METHOD = "http.method"
const string HTTP_PATH = "http.path"
const string HTTP_URL = "http.url"
const string HTTP_STATUS_CODE = "http.status_code"
const string HTTP_REQUEST_SIZE = "http.request.size"
const string HTTP_RESPONSE_SIZE = "http.response.size"
const string LOCAL_COMPONENT = "lc"
const string CLIENT_ADDR = "ca"
const string SERVER_ADDR = "sa"
struct Endpoint {
1: i32 ipv4
2: i16 port
3: string service_name
}
struct Annotation {
1: i64 timestamp
2: string value
3: optional Endpoint host
}
enum AnnotationType {
BOOL,
BYTES,
I16,
I32,
I64,
DOUBLE,
STRING
}
struct BinaryAnnotation {
1: string key,
2: binary value,
3: AnnotationType annotation_type,
4: optional Endpoint host
}
struct Span {
1: i64 trace_id
3: string name,
4: i64 id,
5: optional i64 parent_id,
6: list<Annotation> annotations,
8: list<BinaryAnnotation> binary_annotations
9: optional bool debug = 0
10: optional i64 timestamp,
11: optional i64 duration
}