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 AzureTelemetryClientclientprivate static StringERROR_CLASSNAMEprivate static StringERROR_CODEprivate static StringERROR_MSGprivate static StringERROR_STACKTRACEprivate static StringERROR_TYPEprivate static StringeventNamePrefixprivate static StringOP_IDprivate static StringOP_NAMEprivate static StringOP_PARENT_IDprivate static StringOP_TYPEprivate static StringOPERATION_NAMEprivate static StringSERVICE_NAME
-
Constructor Summary
Constructors Constructor Description AzureTelemeter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidafterCreate(IAzureOperation op)static voidafterExit(IAzureOperation op)static voidbeforeEnter(IAzureOperation op)private static Map<String,String>getActionProperties(IAzureOperation operation)static Map<String,String>getCommonProperties()private static Map<String,String>getParameterProperties(AzureOperationRef ref)private static <U> Uinstantiate(Class<? extends U> clazz)static voidlog(AzureTelemetry.Type type, Map<String,String> properties)static voidlog(AzureTelemetry.Type type, Map<String,String> properties, Throwable e)static voidonError(IAzureOperation op, Throwable error)private static Map<String,String>serialize(IAzureOperation op)private static HashMap<String,String>serialize(Throwable e)static voidsetCommonProperties(Map<String,String> commonProperties)
-
-
-
Field Detail
-
SERVICE_NAME
private static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
OPERATION_NAME
private static final String OPERATION_NAME
- See Also:
- Constant Field Values
-
OP_ID
private static final String OP_ID
- See Also:
- Constant Field Values
-
OP_NAME
private static final String OP_NAME
- See Also:
- Constant Field Values
-
OP_TYPE
private static final String OP_TYPE
- See Also:
- Constant Field Values
-
OP_PARENT_ID
private static final String OP_PARENT_ID
- See Also:
- Constant Field Values
-
ERROR_CODE
private static final String ERROR_CODE
- See Also:
- Constant Field Values
-
ERROR_MSG
private static final String ERROR_MSG
- See Also:
- Constant Field Values
-
ERROR_TYPE
private static final String ERROR_TYPE
- See Also:
- Constant Field Values
-
ERROR_CLASSNAME
private static final String ERROR_CLASSNAME
- See Also:
- Constant Field Values
-
ERROR_STACKTRACE
private static final String ERROR_STACKTRACE
- See Also:
- Constant Field Values
-
client
@Nullable private static AzureTelemetryClient client
-
-
Method Detail
-
setCommonProperties
public static void setCommonProperties(@Nullable Map<String,String> commonProperties)
-
afterCreate
public static void afterCreate(@Nonnull IAzureOperation op)
-
beforeEnter
public static void beforeEnter(@Nonnull IAzureOperation op)
-
afterExit
public static void afterExit(@Nonnull IAzureOperation op)
-
onError
public static void onError(@Nonnull IAzureOperation op, Throwable error)
-
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(AzureOperationRef ref)
-
getActionProperties
@Nonnull private static Map<String,String> getActionProperties(IAzureOperation operation)
-
instantiate
private static <U> U instantiate(Class<? extends U> clazz)
-
-