File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,8 @@ public function getResourceMetricMeasures(): array
123
123
'type ' => $ this ->params ->resourceType (),
124
124
'granularity ' => $ this ->params ->granularity (),
125
125
'aggregation ' => $ this ->params ->aggregation (),
126
+ 'start ' => $ this ->params ->measureStart (),
127
+ 'stop ' => $ this ->params ->measureStop ()
126
128
],
127
129
];
128
130
}
Original file line number Diff line number Diff line change @@ -70,4 +70,24 @@ public function aggregation(): array
70
70
'type ' => self ::STRING_TYPE
71
71
];
72
72
}
73
+
74
+ private function measureTimestamp (string $ sentAs ): array
75
+ {
76
+ return [
77
+ 'location ' => self ::QUERY ,
78
+ 'type ' => self ::STRING_TYPE ,
79
+ 'sentAs ' => $ sentAs ,
80
+ 'description ' => 'Measure start timestamp which can be either a floating number (UNIX epoch) or an ISO8601 formatted timestamp '
81
+ ];
82
+ }
83
+
84
+ public function measureStart (): array
85
+ {
86
+ return $ this ->measureTimestamp ('start ' );
87
+ }
88
+
89
+ public function measureStop (): array
90
+ {
91
+ return $ this ->measureTimestamp ('stop ' );
92
+ }
73
93
}
You can’t perform that action at this time.
0 commit comments