akshayrai commented on a change in pull request #4322: [TE] detection health
status
URL: https://github.com/apache/incubator-pinot/pull/4322#discussion_r294404779
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DetectionResource.java
##########
@@ -562,4 +564,19 @@ public Response getPredictedBaseline(
return Response.ok(baselineTimeseries).build();
}
+
+ @GET
+ @Path(value = "/health/{id}")
+ @ApiOperation("Get the detection health metrics and statuses for a detection
config")
+ public Response getDetectionHealth(@PathParam("id") @ApiParam("detection
config id") long id,
+ @ApiParam("Start time for the the health metric") @QueryParam("start")
long start,
+ @ApiParam("End time for the the health metric") @QueryParam("end") long
end,
+ @ApiParam("Max number of detection tasks returned") @QueryParam("limit")
@DefaultValue("500") long limit) throws JsonProcessingException {
+ DetectionHealth health = new DetectionHealth.Builder(id, start,
end).addRegressionStatus(this.evaluationDAO)
Review comment:
Add a log statement. Consider wrapping this in try-catch similar to
YamlResource.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]