Interface MetricCollector

  • All Known Implementing Classes:
    NullMetricCollector

    public interface MetricCollector
    Author:
    sschwarz Metric Collector Interface that provides methods that can be implemented to collect metrics for your metric tool
    • Method Detail

      • onInvokeByEventSuccess

        void onInvokeByEventSuccess​(String externalSystem,
                                    double requestDurationInSec,
                                    String event,
                                    String accountId)
        Is invoked when a lambda is invoked by event successfully
        Parameters:
        externalSystem - the name of the external system doing the invocation
        requestDurationInSec - time the request took in seconds
        event - the event that was used for the invocation i.e. all functions implementing this event were called
        accountId - AccountId related to function call
      • onInvokeByEventFailure

        void onInvokeByEventFailure​(String externalSystem,
                                    double requestDurationInSec,
                                    String event,
                                    String accountId,
                                    int statusCode,
                                    Exception ex)
        Is invoked when a lambda invocation by event fails
        Parameters:
        externalSystem - the name of the external system doing the invocation
        requestDurationInSec - time the request took in seconds
        event - the event that was used for the invocation i.e. all functions implementing this event were called
        accountId - AccountId related to function call
        ex - Exception that caused the program to fail
      • onInvokeByUUIDSuccess

        void onInvokeByUUIDSuccess​(String externalSystem,
                                   double requestDurationInSec,
                                   String UUID,
                                   String accountId)
        is invoked when a lambda Invocation by UUID is successfull
        Parameters:
        externalSystem - the name of the external system doing the invocation
        requestDurationInSec - time the request took in seconds
        UUID - UUID of function that was invoked
        accountId - AccountId related to function call
      • onInvokeByUUIDFailure

        void onInvokeByUUIDFailure​(String externalSystem,
                                   double requestDurationInSec,
                                   String UUID,
                                   String accountId,
                                   int statusCode,
                                   Exception ex)
        is invoked when a lambda Invocation by UUID fails
        Parameters:
        externalSystem - the name of the external system doing the invocation
        requestDurationInSec - time the request took in seconds
        UUID - UUID of function that was invoked
        accountId - AccountId related to function call
        ex - Exception that caused the program to fail
      • onGetLambdasSuccess

        void onGetLambdasSuccess​(String userId,
                                 double requestDurationInSec,
                                 String accountId)
        is invoked when all lambdas are retrieved successfully
        Parameters:
        userId - User Id related to account for which lambdas are retrieved
        requestDurationInSec - time the request took in seconds
        accountId - AccountId related to function call
      • onGetLambdasFailure

        void onGetLambdasFailure​(String userId,
                                 double requestDurationInSec,
                                 String accountId,
                                 int statusCode,
                                 Exception ex)
        is invoked when retrieval of lambdas failed
        Parameters:
        userId - User Id related to account for which lambdas are retrieved
        requestDurationInSec - time the request took in seconds
        accountId - AccountId related to function call
        ex - Exception that caused the program to fail
      • onIsImplementedSuccess

        void onIsImplementedSuccess​(String externalSystem,
                                    double requestDurationInSec,
                                    String event,
                                    String accountId)
        is invoked when implementation of a specific event is successfully inquired
        Parameters:
        externalSystem - the name of the external system doing the invocation
        requestDurationInSec - time the request took in seconds
        event - event for which it was verified whether any lambdas implementing it exist
        accountId - AccountId related to function call
      • onIsImplementedFailure

        void onIsImplementedFailure​(String externalSystem,
                                    double requestDurationInSec,
                                    String event,
                                    String accountId,
                                    int statusCode,
                                    Exception ex)
        is invoked when implementation of a specific event is unsuccessfully inquired
        Parameters:
        externalSystem - the name of the external system doing the invocation
        requestDurationInSec - time the request took in seconds
        event - event for which it was verified whether any lambdas implementing it exist
        accountId - AccountId related to function call
        ex - Exception that caused the program to fail