mneethiraj commented on a change in pull request #39: ATLAS-3071:Add
Functionalities to Collect Notification Metrics
URL: https://github.com/apache/atlas/pull/39#discussion_r272451957
##########
File path: repository/src/main/java/org/apache/atlas/util/AtlasMetricsUtil.java
##########
@@ -251,4 +257,48 @@ private String millisToTimeDiff(long msDiff) {
private String millisToTimeStamp(long ms) {
return simpleDateFormat.format(ms);
}
+
+ public void setSuccessfulMetrics(HookNotification.HookNotificationType
type, long timestamp) {
Review comment:
Consider replacing methods setSuccessfulMetrics() and setFailedMetrics()
with the following method:
public void onNotificationProcessingComplete(HookNotificationType type,
boolean isSuccess) {
long startTimeMs = RequestContext.get().getRequestTime();
long timeTakenMs = System.currentTimeMillis() - startTimeMs;
// ..
}
----------------------------------------------------------------
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