1
2
3
4
5 package metrics
6
7
8 type Description struct {
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 Name string
33
34
35 Description string
36
37
38
39
40
41 Kind ValueKind
42
43
44
45
46
47
48 Cumulative bool
49 }
50
51
52
53 var allDesc = []Description{
54 {
55 Name: "/cgo/go-to-c-calls:calls",
56 Description: "Count of calls made from Go to C by the current process.",
57 Kind: KindUint64,
58 Cumulative: true,
59 },
60 {
61 Name: "/gc/cycles/automatic:gc-cycles",
62 Description: "Count of completed GC cycles generated by the Go runtime.",
63 Kind: KindUint64,
64 Cumulative: true,
65 },
66 {
67 Name: "/gc/cycles/forced:gc-cycles",
68 Description: "Count of completed GC cycles forced by the application.",
69 Kind: KindUint64,
70 Cumulative: true,
71 },
72 {
73 Name: "/gc/cycles/total:gc-cycles",
74 Description: "Count of all completed GC cycles.",
75 Kind: KindUint64,
76 Cumulative: true,
77 },
78 {
79 Name: "/gc/heap/allocs-by-size:bytes",
80 Description: "Distribution of heap allocations by approximate size. " +
81 "Note that this does not include tiny objects as defined by " +
82 "/gc/heap/tiny/allocs:objects, only tiny blocks.",
83 Kind: KindFloat64Histogram,
84 Cumulative: true,
85 },
86 {
87 Name: "/gc/heap/allocs:bytes",
88 Description: "Cumulative sum of memory allocated to the heap by the application.",
89 Kind: KindUint64,
90 Cumulative: true,
91 },
92 {
93 Name: "/gc/heap/allocs:objects",
94 Description: "Cumulative count of heap allocations triggered by the application. " +
95 "Note that this does not include tiny objects as defined by " +
96 "/gc/heap/tiny/allocs:objects, only tiny blocks.",
97 Kind: KindUint64,
98 Cumulative: true,
99 },
100 {
101 Name: "/gc/heap/frees-by-size:bytes",
102 Description: "Distribution of freed heap allocations by approximate size. " +
103 "Note that this does not include tiny objects as defined by " +
104 "/gc/heap/tiny/allocs:objects, only tiny blocks.",
105 Kind: KindFloat64Histogram,
106 Cumulative: true,
107 },
108 {
109 Name: "/gc/heap/frees:bytes",
110 Description: "Cumulative sum of heap memory freed by the garbage collector.",
111 Kind: KindUint64,
112 Cumulative: true,
113 },
114 {
115 Name: "/gc/heap/frees:objects",
116 Description: "Cumulative count of heap allocations whose storage was freed " +
117 "by the garbage collector. " +
118 "Note that this does not include tiny objects as defined by " +
119 "/gc/heap/tiny/allocs:objects, only tiny blocks.",
120 Kind: KindUint64,
121 Cumulative: true,
122 },
123 {
124 Name: "/gc/heap/goal:bytes",
125 Description: "Heap size target for the end of the GC cycle.",
126 Kind: KindUint64,
127 },
128 {
129 Name: "/gc/heap/objects:objects",
130 Description: "Number of objects, live or unswept, occupying heap memory.",
131 Kind: KindUint64,
132 },
133 {
134 Name: "/gc/heap/tiny/allocs:objects",
135 Description: "Count of small allocations that are packed together into blocks. " +
136 "These allocations are counted separately from other allocations " +
137 "because each individual allocation is not tracked by the runtime, " +
138 "only their block. Each block is already accounted for in " +
139 "allocs-by-size and frees-by-size.",
140 Kind: KindUint64,
141 Cumulative: true,
142 },
143 {
144 Name: "/gc/limiter/last-enabled:gc-cycle",
145 Description: "GC cycle the last time the GC CPU limiter was enabled. " +
146 "This metric is useful for diagnosing the root cause of an out-of-memory " +
147 "error, because the limiter trades memory for CPU time when the GC's CPU " +
148 "time gets too high. This is most likely to occur with use of SetMemoryLimit. " +
149 "The first GC cycle is cycle 1, so a value of 0 indicates that it was never enabled.",
150 Kind: KindUint64,
151 },
152 {
153 Name: "/gc/pauses:seconds",
154 Description: "Distribution individual GC-related stop-the-world pause latencies.",
155 Kind: KindFloat64Histogram,
156 Cumulative: true,
157 },
158 {
159 Name: "/gc/stack/starting-size:bytes",
160 Description: "The stack size of new goroutines.",
161 Kind: KindUint64,
162 Cumulative: false,
163 },
164 {
165 Name: "/memory/classes/heap/free:bytes",
166 Description: "Memory that is completely free and eligible to be returned to the underlying system, " +
167 "but has not been. This metric is the runtime's estimate of free address space that is backed by " +
168 "physical memory.",
169 Kind: KindUint64,
170 },
171 {
172 Name: "/memory/classes/heap/objects:bytes",
173 Description: "Memory occupied by live objects and dead objects that have not yet been marked free by the garbage collector.",
174 Kind: KindUint64,
175 },
176 {
177 Name: "/memory/classes/heap/released:bytes",
178 Description: "Memory that is completely free and has been returned to the underlying system. This " +
179 "metric is the runtime's estimate of free address space that is still mapped into the process, " +
180 "but is not backed by physical memory.",
181 Kind: KindUint64,
182 },
183 {
184 Name: "/memory/classes/heap/stacks:bytes",
185 Description: "Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use.",
186 Kind: KindUint64,
187 },
188 {
189 Name: "/memory/classes/heap/unused:bytes",
190 Description: "Memory that is reserved for heap objects but is not currently used to hold heap objects.",
191 Kind: KindUint64,
192 },
193 {
194 Name: "/memory/classes/metadata/mcache/free:bytes",
195 Description: "Memory that is reserved for runtime mcache structures, but not in-use.",
196 Kind: KindUint64,
197 },
198 {
199 Name: "/memory/classes/metadata/mcache/inuse:bytes",
200 Description: "Memory that is occupied by runtime mcache structures that are currently being used.",
201 Kind: KindUint64,
202 },
203 {
204 Name: "/memory/classes/metadata/mspan/free:bytes",
205 Description: "Memory that is reserved for runtime mspan structures, but not in-use.",
206 Kind: KindUint64,
207 },
208 {
209 Name: "/memory/classes/metadata/mspan/inuse:bytes",
210 Description: "Memory that is occupied by runtime mspan structures that are currently being used.",
211 Kind: KindUint64,
212 },
213 {
214 Name: "/memory/classes/metadata/other:bytes",
215 Description: "Memory that is reserved for or used to hold runtime metadata.",
216 Kind: KindUint64,
217 },
218 {
219 Name: "/memory/classes/os-stacks:bytes",
220 Description: "Stack memory allocated by the underlying operating system.",
221 Kind: KindUint64,
222 },
223 {
224 Name: "/memory/classes/other:bytes",
225 Description: "Memory used by execution trace buffers, structures for debugging the runtime, finalizer and profiler specials, and more.",
226 Kind: KindUint64,
227 },
228 {
229 Name: "/memory/classes/profiling/buckets:bytes",
230 Description: "Memory that is used by the stack trace hash map used for profiling.",
231 Kind: KindUint64,
232 },
233 {
234 Name: "/memory/classes/total:bytes",
235 Description: "All memory mapped by the Go runtime into the current process as read-write. Note that this does not include memory mapped by code called via cgo or via the syscall package. Sum of all metrics in /memory/classes.",
236 Kind: KindUint64,
237 },
238 {
239 Name: "/sched/gomaxprocs:threads",
240 Description: "The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously.",
241 Kind: KindUint64,
242 },
243 {
244 Name: "/sched/goroutines:goroutines",
245 Description: "Count of live goroutines.",
246 Kind: KindUint64,
247 },
248 {
249 Name: "/sched/latencies:seconds",
250 Description: "Distribution of the time goroutines have spent in the scheduler in a runnable state before actually running.",
251 Kind: KindFloat64Histogram,
252 },
253 }
254
255
256 func All() []Description {
257 return allDesc
258 }
259
View as plain text