Package org.sunbird.telemetry.logger
Class TelemetryManager
- java.lang.Object
-
- org.sunbird.telemetry.logger.TelemetryManager
-
public class TelemetryManager extends Object
This class is used to generate and handle telemetry.- Author:
- Rashmi and Mahesh
-
-
Constructor Summary
Constructors Constructor Description TelemetryManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaccess(Map<String,String> context, Map<String,Object> params)To log api_access as a telemetry event.static voidaudit(String id, String type, List<String> props)static voidaudit(String id, String type, List<String> props, String state, String prevState)static voiderror(String message)static voiderror(String message, Throwable e)To log exception with message and params as a telemetry event.static voiderror(String message, Throwable e, Object object)static voiderror(String message, Map<String,Object> params)static voidinfo(String message)To log only message as a telemetry event.static voidinfo(String message, Map<String,Object> params)To log message with params as a telemetry event.static voidlog(String message)To log only message as a telemetry event.static voidlog(String message, Map<String,Object> params)To log message with params as a telemetry event.static voidsearch(String query, Object filters, Object sort, int size, Object topN, String type)static voidsearch(Map<String,Object> context, String query, Object filters, Object sort, int size, Object topN, String type)static voidwarn(String message)static voidwarn(String message, Map<String,Object> params)
-
-
-
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 eventparams- 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 eventparams- 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 eventparams- 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 eventparams- 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 eventparams- 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 evente- exception details in the event
-
error
public static void error(String message, Throwable e, Object object)
- Parameters:
message- message of the evente- exception details in the eventobject- object of the event
-
audit
public static void audit(String id, String type, List<String> props, String state, String prevState)
-
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 eventsort- sort for the search eventsize- 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 eventquery- query for the searchfilters- filters of the eventsort- sort for the searchsize- size for the search result.topN- size for the search result.type- type of the event
-
-