Class TelemetryManager


  • public class TelemetryManager
    extends Object
    This class is used to generate and handle telemetry.
    Author:
    Rashmi and Mahesh
    • Constructor Detail

      • TelemetryManager

        public TelemetryManager()
    • Method Detail

      • access

        public static void access​(Map<String,​String> context,
                                  Map<String,​Object> params)
        To log api_access as a telemetry event.
        Parameters:
        context - context of the event
        params - params of the event
      • log

        public static void log​(String message)
        To log only message as a telemetry event.
        Parameters:
        message - message of the event
      • log

        public static void log​(String message,
                               Map<String,​Object> params)
        To log message with params as a telemetry event.
        Parameters:
        message - message of the event
        params - params of the event
      • info

        public static void info​(String message)
        To log only message as a telemetry event.
        Parameters:
        message - message of the event
      • info

        public static void info​(String message,
                                Map<String,​Object> params)
        To log message with params as a telemetry event.
        Parameters:
        message - message of the event
        params - params of the event
      • warn

        public static void warn​(String message)
        Parameters:
        message - message of the event
      • warn

        public static void warn​(String message,
                                Map<String,​Object> params)
        Parameters:
        message - message of the event
        params - params of the event
      • error

        public static void error​(String message)
        Parameters:
        message - message of the event
      • error

        public static void error​(String message,
                                 Map<String,​Object> params)
        Parameters:
        message - message of the event
        params - params of the event
      • error

        public static void error​(String message,
                                 Throwable e)
        To log exception with message and params as a telemetry event.
        Parameters:
        message - message of the event
        e - exception details in the event
      • error

        public static void error​(String message,
                                 Throwable e,
                                 Object object)
        Parameters:
        message - message of the event
        e - exception details in the event
        object - object of the event
      • search

        public static void search​(String query,
                                  Object filters,
                                  Object sort,
                                  int size,
                                  Object topN,
                                  String type)
        Parameters:
        query - query in the event.
        filters - filters of the event
        sort - sort for the search event
        size - size for the search result.
        topN - size for the search result.
        type - type of the event
      • search

        public static void search​(Map<String,​Object> context,
                                  String query,
                                  Object filters,
                                  Object sort,
                                  int size,
                                  Object topN,
                                  String type)
        Parameters:
        context - context of the event
        query - query for the search
        filters - filters of the event
        sort - sort for the search
        size - size for the search result.
        topN - size for the search result.
        type - type of the event