-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparse-prometheus-text-format.d.ts
53 lines (53 loc) · 1.4 KB
/
parse-prometheus-text-format.d.ts
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
declare module "parse-prometheus-text-format" {
type GaugeDescriptor = {
type: 'GAUGE'
name: string
help: string
metrics: Array<{
value: number
labels?: Record<string,string>
}>
}
type HistogramDescriptor = {
type: 'HISTOGRAM'
name: string
help: string
metrics: Array<{
buckets: Record<string,string>
count: string
sum: string
labels?: Record<string,string>
}>
}
type SummaryDescriptor = {
type: 'SUMMARY'
name: string
help: string
metrics: Array<{
quantiles?: Record<string,string>
count: string
sum: string
labels?: Record<string,string>
}>
}
type UntypedDescriptor = {
type: 'UNTYPED'
name: string
help: string
metrics: Array<{
value: string
labels?: Record<string,string>
}>
}
type CounterDescriptor = {
type: 'COUNTER'
name: string
help: string
metrics: Array<{
value: string
labels?: Record<string,string>
}>
}
type MetricsDescriptor = GaugeDescriptor | HistogramDescriptor | SummaryDescriptor | UntypedDescriptor | CounterDescriptor
export default function parse(metricsString: string): MetricsDescriptor[]
}