-
Notifications
You must be signed in to change notification settings - Fork 72
/
application_metric.go
54 lines (47 loc) · 2.11 KB
/
application_metric.go
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
package model
type AppAggrTag struct {
Range string `json:"range,omitempty"`
Tags string `json:"tags,omitempty"`
}
type AppMetric struct {
Id int64 `json:"id,omitempty"`
TaskId int64 `json:"taskId,omitempty"`
MetricName string `json:"metricName,omitempty"`
MetricAlias string `json:"metricAlias,omitempty"`
MetricUnit string `json:"metricUnit,omitempty"`
ValueFieldType int `json:"valueFieldType,omitempty"`
ValueFieldName string `json:"valueFieldName,omitempty"`
ValueMatchRule string `json:"valueMatchRule,omitempty"`
AggrTags []AppAggrTag `json:"aggrTags,omitempty"`
SaveInstanceData int `json:"saveInstanceData,omitempty"`
}
type GetMetricMetaForApplicationRequest struct {
UserId string `json:"userId,omitempty"`
AppName string `json:"appName,omitempty"`
TaskName string `json:"taskName,omitempty"`
MetricName string `json:"metricName,omitempty"`
Instances []string `json:"instances,omitempty"`
DimensionKeys []string `json:"dimensionKeys,omitempty"`
}
type GetMetricDataForApplicationRequest struct {
UserId string `json:"userId,omitempty"`
AppName string `json:"appName,omitempty"`
TaskName string `json:"taskName,omitempty"`
MetricName string `json:"metricName,omitempty"`
Instances []string `json:"instances,omitempty"`
StartTime string `json:"startTime,omitempty"`
EndTime string `json:"endTime,omitempty"`
Cycle int `json:"cycle,omitempty"`
Statistics []string `json:"statistics,omitempty"`
Dimensions map[string][]string `json:"dimensions,omitempty"`
AggrData bool `json:"aggrData,omitempty"`
}
type MetricDataDimension struct {
Key string `json:"key,omitempty"`
Value string `json:"value,omitempty"`
}
type GetMetricDataForApplicationResult struct {
Namespace string `json:"namespace,omitempty"`
Dimensions []MetricDataDimension `json:"dimensions,omitempty"`
DataPoints []DataPoints `json:"dataPoints"`
}