-
Notifications
You must be signed in to change notification settings - Fork 530
/
Copy pathspan.json
167 lines (167 loc) · 8.27 KB
/
span.json
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
{
"$id": "docs/spec/spans/span.json",
"type": "object",
"description": "An event captured by an agent occurring in a monitored service",
"allOf": [
{ "$ref": "../timestamp_epoch.json" },
{
"properties": {
"id": {
"description": "Hex encoded 64 random bits ID of the span.",
"type": "string",
"maxLength": 1024
},
"transaction_id": {
"type": ["string", "null"],
"description": "Hex encoded 64 random bits ID of the correlated transaction.",
"maxLength": 1024
},
"trace_id": {
"description": "Hex encoded 128 random bits ID of the correlated trace.",
"type": "string",
"maxLength": 1024
},
"parent_id": {
"description": "Hex encoded 64 random bits ID of the parent transaction or span.",
"type": "string",
"maxLength": 1024
},
"start": {
"type": ["number", "null"],
"description": "Offset relative to the transaction's timestamp identifying the start of the span, in milliseconds"
},
"subtype": {
"type": ["string", "null"],
"description": "A further sub-division of the type (e.g. postgresql, elasticsearch)",
"maxLength": 1024
},
"action": {
"type": ["string", "null"],
"description": "The specific kind of event within the sub-type represented by the span (e.g. query, connect)",
"maxLength": 1024
},
"context": {
"type": ["object", "null"],
"description": "Any other arbitrary data captured by the agent, optionally provided by the user",
"properties": {
"db": {
"type": ["object", "null"],
"description": "An object containing contextual data for database spans",
"properties": {
"instance": {
"type": ["string", "null"],
"description": "Database instance name"
},
"statement": {
"type": ["string", "null"],
"description": "A database statement (e.g. query) for the given database type"
},
"type": {
"type": ["string", "null"],
"description": "Database type. For any SQL database, \"sql\". For others, the lower-case database category, e.g. \"cassandra\", \"hbase\", or \"redis\""
},
"user": {
"type": ["string", "null"],
"description": "Username for accessing database"
}
}
},
"http": {
"type": ["object", "null"],
"description": "An object containing contextual data of the related http request.",
"properties": {
"url": {
"type": ["string", "null"],
"description": "The raw url of the correlating http request."
},
"status_code": {
"type": ["integer", "null"],
"description": "The status code of the http request."
},
"method": {
"type": ["string", "null"],
"maxLength": 1024,
"description": "The method of the http request."
}
}
},
"tags": {
"$ref": "../tags.json"
},
"service": {
"description": "Service related information can be sent per event. Provided information will override the more generic information from metadata, non provided fields will be set according to the metadata information.",
"properties": {
"agent": {
"description": "Name and version of the Elastic APM agent",
"type": [
"object",
"null"
],
"properties": {
"name": {
"description": "Name of the Elastic APM agent, e.g. \"Python\"",
"type": [
"string",
"null"
],
"maxLength": 1024
},
"version": {
"description": "Version of the Elastic APM agent, e.g.\"1.0.0\"",
"type": [
"string",
"null"
],
"maxLength": 1024
}
}
},
"name": {
"description": "Immutable name of the service emitting this event",
"type": [
"string",
"null"
],
"pattern": "^[a-zA-Z0-9 _-]+$",
"maxLength": 1024
}
}
}
}
},
"duration": {
"type": "number",
"description": "Duration of the span in milliseconds"
},
"name": {
"type": "string",
"description": "Generic designation of a span in the scope of a transaction",
"maxLength": 1024
},
"stacktrace": {
"type": ["array", "null"],
"description": "List of stack frames with variable attributes (eg: lineno, filename, etc)",
"items": {
"$ref": "../stacktrace_frame.json"
},
"minItems": 0
},
"type": {
"type": "string",
"description": "Keyword of specific relevance in the service's domain (eg: 'db.postgresql.query', 'template.erb', etc)",
"maxLength": 1024
},
"sync": {
"type": ["boolean", "null"],
"description": "Indicates whether the span was executed synchronously or asynchronously."
}
},
"required": ["duration", "name", "type", "id","trace_id", "parent_id"]
},
{ "anyOf":[
{"required": ["timestamp"], "properties": {"timestamp": { "type": "integer" }}},
{"required": ["start"], "properties": {"start": { "type": "number" }}}
]
}
]
}