Class ExceptionTelemetry
- java.lang.Object
-
- com.microsoft.applicationinsights.telemetry.BaseTelemetry
-
- com.microsoft.applicationinsights.telemetry.ExceptionTelemetry
-
- All Implemented Interfaces:
Telemetry
public final class ExceptionTelemetry extends BaseTelemetry
Telemetry type used to track exceptions sent to Azure Application Insights.
-
-
Constructor Summary
Constructors Constructor Description ExceptionTelemetry()
ExceptionTelemetry(java.lang.Throwable throwable)
Creates a new instance.ExceptionTelemetry(java.lang.Throwable throwable, int stackSize)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExceptionData
getData()
java.lang.Exception
getException()
java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Double>
getMetrics()
Gets a dictionary of custom defined metrics.SeverityLevel
getSeverityLevel()
java.lang.Throwable
getThrowable()
void
setException(java.lang.Throwable throwable)
void
setException(java.lang.Throwable throwable, int stackSize)
void
setSeverityLevel(SeverityLevel severityLevel)
-
Methods inherited from class com.microsoft.applicationinsights.telemetry.BaseTelemetry
getContext, getProperties, getTimestamp, initialize, setTimestamp
-
-
-
-
Constructor Detail
-
ExceptionTelemetry
public ExceptionTelemetry()
-
ExceptionTelemetry
public ExceptionTelemetry(java.lang.Throwable throwable, int stackSize)
Creates a new instance.- Parameters:
stackSize
- The max stack size to report.throwable
- The exception to track.
-
ExceptionTelemetry
public ExceptionTelemetry(java.lang.Throwable throwable)
Creates a new instance.- Parameters:
throwable
- The exception to track.
-
-
Method Detail
-
getThrowable
public java.lang.Throwable getThrowable()
-
getException
@Nullable public java.lang.Exception getException()
-
setException
public void setException(java.lang.Throwable throwable)
-
setException
public void setException(java.lang.Throwable throwable, int stackSize)
-
setSeverityLevel
public void setSeverityLevel(SeverityLevel severityLevel)
-
getSeverityLevel
@Nullable public SeverityLevel getSeverityLevel()
-
getMetrics
public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Double> getMetrics()
Gets a dictionary of custom defined metrics.
-
getData
protected ExceptionData getData()
- Specified by:
getData
in classBaseTelemetry
-
-