Class AzureTelemeter
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemeter
-
public class AzureTelemeter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAzureTelemeter.ErrorType
-
Field Summary
Fields Modifier and Type Field Description private static AzureTelemetryClientclientstatic StringERROR_CLASSNAMEstatic StringERROR_CODEstatic StringERROR_MSGstatic StringERROR_ROOT_CLASSNAMEstatic StringERROR_ROOT_MSGstatic StringERROR_STACKTRACEstatic StringERROR_TYPEstatic StringINFO_BUNDLEstatic StringINFO_DETAILSstatic StringINFO_NAMEstatic StringINFO_SERVICEstatic StringOP_IDstatic StringOP_NAMEstatic StringOP_PARENT_IDstatic StringOP_TYPEstatic StringOPERATION_NAMEstatic StringSERVICE_NAME
-
Constructor Summary
Constructors Constructor Description AzureTelemeter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddCommonProperties(Map<String,String> commonProperties)static voidaddCommonProperty(String key, String value)static voidafterCreate(Operation op)static voidafterExit(Operation op)static voidbeforeEnter(Operation op)private static Map<String,String>getActionProperties(Operation operation)private static Map<String,String>getParameterProperties(MethodOperation ref)static voidinfo(@PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") String key)static voidinfo(@PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") String key, String details)static voidinfo(@PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") String key, Map<String,String> details)private static <U> Uinstantiate(Class<? extends U> clazz)static voidlog(AzureTelemetry.Type type, AzureString op)static voidlog(AzureTelemetry.Type type, AzureString op, Throwable e)static voidlog(AzureTelemetry.Type type, String opId)static voidlog(AzureTelemetry.Type type, String opId, Throwable e)static voidlog(AzureTelemetry.Type type, Map<String,String> properties)static voidlog(AzureTelemetry.Type type, Map<String,String> properties, Throwable e)static voidonError(Operation op, Throwable error)private static Map<String,String>serialize(Operation op)private static HashMap<String,String>serialize(Throwable e)static voidsetEventNamePrefix(String prefix)
-
-
-
Field Detail
-
INFO_BUNDLE
public static final String INFO_BUNDLE
- See Also:
- Constant Field Values
-
SERVICE_NAME
public static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
OPERATION_NAME
public static final String OPERATION_NAME
- See Also:
- Constant Field Values
-
OP_ID
public static final String OP_ID
- See Also:
- Constant Field Values
-
OP_NAME
public static final String OP_NAME
- See Also:
- Constant Field Values
-
OP_TYPE
public static final String OP_TYPE
- See Also:
- Constant Field Values
-
OP_PARENT_ID
public static final String OP_PARENT_ID
- See Also:
- Constant Field Values
-
INFO_NAME
public static final String INFO_NAME
- See Also:
- Constant Field Values
-
INFO_SERVICE
public static final String INFO_SERVICE
- See Also:
- Constant Field Values
-
INFO_DETAILS
public static final String INFO_DETAILS
- See Also:
- Constant Field Values
-
ERROR_CODE
public static final String ERROR_CODE
- See Also:
- Constant Field Values
-
ERROR_MSG
public static final String ERROR_MSG
- See Also:
- Constant Field Values
-
ERROR_ROOT_MSG
public static final String ERROR_ROOT_MSG
- See Also:
- Constant Field Values
-
ERROR_TYPE
public static final String ERROR_TYPE
- See Also:
- Constant Field Values
-
ERROR_CLASSNAME
public static final String ERROR_CLASSNAME
- See Also:
- Constant Field Values
-
ERROR_ROOT_CLASSNAME
public static final String ERROR_ROOT_CLASSNAME
- See Also:
- Constant Field Values
-
ERROR_STACKTRACE
public static final String ERROR_STACKTRACE
- See Also:
- Constant Field Values
-
client
@Nonnull private static final AzureTelemetryClient client
-
-
Method Detail
-
addCommonProperties
public static void addCommonProperties(@Nonnull Map<String,String> commonProperties)
-
info
public static void info(@Nonnull @PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") @PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") String key)
-
info
public static void info(@Nonnull @PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") @PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") String key, String details)
-
info
public static void info(@Nonnull @PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") @PropertyKey(resourceBundle="bundles.com.microsoft.azure.toolkit.info") String key, Map<String,String> details)
-
log
public static void log(AzureTelemetry.Type type, String opId)
-
log
public static void log(AzureTelemetry.Type type, AzureString op)
-
log
public static void log(AzureTelemetry.Type type, String opId, Throwable e)
-
log
public static void log(AzureTelemetry.Type type, AzureString op, Throwable e)
-
log
public static void log(AzureTelemetry.Type type, Map<String,String> properties, Throwable e)
-
log
public static void log(AzureTelemetry.Type type, Map<String,String> properties)
-
getParameterProperties
private static Map<String,String> getParameterProperties(MethodOperation ref)
-
getActionProperties
@Nonnull private static Map<String,String> getActionProperties(@Nonnull Operation operation)
-
instantiate
private static <U> U instantiate(Class<? extends U> clazz)
-
-