public final class ExceptionTelemetry extends BaseSampleSourceTelemetry<ExceptionData>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BASE_TYPE
Base Type for this telemetry.
|
static java.lang.String |
ENVELOPE_NAME
Envelope Name for this telemetry.
|
TELEMETRY_NAME_PREFIX
Constructor and Description |
---|
ExceptionTelemetry() |
ExceptionTelemetry(java.lang.Throwable exception)
Initializes a new instance.
|
ExceptionTelemetry(java.lang.Throwable exception,
int stackSize)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
additionalSanitize()
Deprecated.
|
java.lang.String |
getBaseTypeName() |
protected ExceptionData |
getData()
Concrete classes should implement this method which supplies the
data structure that this instance works with, which needs to implement
JsonSerializable |
java.lang.String |
getEnvelopName() |
java.lang.Exception |
getException() |
ExceptionHandledAt |
getExceptionHandledAt()
Deprecated.
Gets the value indicated where the exception was handled.
|
java.util.List<ExceptionDetails> |
getExceptions() |
java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Double> |
getMetrics()
Gets a map of application-defined exception metrics.
|
java.lang.String |
getProblemId() |
java.lang.Double |
getSamplingPercentage() |
SeverityLevel |
getSeverityLevel() |
java.lang.Throwable |
getThrowable() |
int |
getVer() |
void |
setException(java.lang.Throwable throwable) |
void |
setException(java.lang.Throwable throwable,
int stackSize) |
void |
setExceptionHandledAt(ExceptionHandledAt value)
Deprecated.
Sets the value indicated where the exception was handled.
|
void |
setSamplingPercentage(java.lang.Double samplingPercentage) |
void |
setSeverityLevel(SeverityLevel severityLevel) |
reset, setSampleRate
getContext, getProperties, getSequence, getTelemetryName, getTimestamp, initialize, normalizeInstrumentationKey, sanitize, serialize, setSequence, setTimestamp, toString
public static final java.lang.String ENVELOPE_NAME
public static final java.lang.String BASE_TYPE
public ExceptionTelemetry()
public ExceptionTelemetry(java.lang.Throwable exception, int stackSize)
stackSize
- The max stack size to report.exception
- The exception to track.public ExceptionTelemetry(java.lang.Throwable exception)
exception
- The exception to track.public int getVer()
getVer
in class BaseTelemetry<ExceptionData>
public java.lang.Exception getException()
public java.lang.Throwable getThrowable()
public void setException(java.lang.Throwable throwable)
public void setException(java.lang.Throwable throwable, int stackSize)
@Deprecated public ExceptionHandledAt getExceptionHandledAt()
@Deprecated public void setExceptionHandledAt(ExceptionHandledAt value)
value
- The value indicating the exceptionpublic java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Double> getMetrics()
public void setSeverityLevel(SeverityLevel severityLevel)
public SeverityLevel getSeverityLevel()
public java.lang.Double getSamplingPercentage()
public void setSamplingPercentage(java.lang.Double samplingPercentage)
@Deprecated protected void additionalSanitize()
BaseTelemetry
additionalSanitize
in class BaseTelemetry<ExceptionData>
protected ExceptionData getData()
BaseTelemetry
JsonSerializable
getData
in class BaseTelemetry<ExceptionData>
public java.util.List<ExceptionDetails> getExceptions()
public java.lang.String getEnvelopName()
getEnvelopName
in class BaseTelemetry<ExceptionData>
public java.lang.String getBaseTypeName()
getBaseTypeName
in class BaseTelemetry<ExceptionData>
public java.lang.String getProblemId()