AvailabilityTelemetry Class
- java.
lang. Object - com.
microsoft. applicationinsights. telemetry. BaseTelemetry - com.
microsoft. applicationinsights. telemetry. BaseSampleSourceTelemetry - com.
microsoft. bot. applicationinsights. AvailabilityTelemetry
- com.
- com.
- com.
public final class AvailabilityTelemetry
extends com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry<com.microsoft.applicationinsights.internal.schemav2.AvailabilityData>
We took this class from https://github.com/microsoft/ApplicationInsights-Java/issues/1099 as this is not already migrated in ApplicationInsights-Java library.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
| static final java.lang.String | BASE_TYPE |
| static final java.lang.String | ENVELOPE_NAME |
Constructor Summary
| Constructor | Description |
|---|---|
| AvailabilityTelemetry() |
Initializes a new instance of the Availability |
| AvailabilityTelemetry(String name, Duration duration, String runLocation, String message, boolean success, ConcurrentMap<String,Double> measurements, ConcurrentMap<String,String> properties) |
Initializes a new instance of the Availability |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| protected void | additionalSanitize() |
| java.lang.String | getBaseTypeName() |
| protected com.microsoft.applicationinsights.internal.schemav2.AvailabilityData | getData() |
| com.microsoft.applicationinsights.telemetry.Duration |
getDuration()
Gets the amount of time it took the application to handle the request. |
| java.lang.String | getEnvelopName() |
| java.lang.String |
getId()
Gets the unique identifier of the request. |
| java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Double> |
getMetrics()
Gets a map of application-defined request metrics. |
| java.lang.String |
getName()
Gets or human-readable name of the requested page. |
| java.lang.String |
getRunLocation()
Gets or human-readable name of the run location. |
| java.lang.Double | getSamplingPercentage() |
| int |
getVer()
Gets the ver value from the data object. |
| boolean |
isSuccess()
Gets a value indicating whether application handled the request successfully. |
| void |
setDuration(Duration duration)
Sets the amount of time it took the application to handle the request. |
| void |
setId(String id)
Sets the unique identifier of the request. |
| void |
setName(String name)
Sets or human-readable name of the requested page. |
| void |
setRunLocation(String runLocation)
Sets or human-readable name of the run location. |
| void | setSamplingPercentage(Double samplingPercentage) |
| void |
setSuccess(boolean success)
Sets a value indicating whether application handled the request successfully. |
| void |
setTimestamp(Date timestamp)
Sets the Start |
Methods inherited from com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry
Methods inherited from com.microsoft.applicationinsights.telemetry.BaseTelemetry
Methods inherited from java.lang.Object
Field Details
BASE_TYPE
public static final String BASE_TYPE
ENVELOPE_NAME
public static final String ENVELOPE_NAME
Constructor Details
AvailabilityTelemetry
public AvailabilityTelemetry()
Initializes a new instance of the AvailabilityTelemetry class.
AvailabilityTelemetry
public AvailabilityTelemetry(String name, Duration duration, String runLocation, String message, boolean success, ConcurrentMap
Initializes a new instance of the AvailabilityTelemetry class with the given name, time stamp, duration, HTTP response code and success property values.
Parameters:
Method Details
additionalSanitize
protected void additionalSanitize()
Overrides:
AvailabilityTelemetry.additionalSanitize()getBaseTypeName
public String getBaseTypeName()
Overrides:
AvailabilityTelemetry.getBaseTypeName()getData
protected AvailabilityData getData()
Overrides:
AvailabilityTelemetry.getData()getDuration
public Duration getDuration()
Gets the amount of time it took the application to handle the request.
Returns:
getEnvelopName
public String getEnvelopName()
Overrides:
AvailabilityTelemetry.getEnvelopName()getId
public String getId()
Gets the unique identifier of the request.
Returns:
getMetrics
public ConcurrentMap
Gets a map of application-defined request metrics.
Returns:
getName
public String getName()
Gets or human-readable name of the requested page.
Returns:
getRunLocation
public String getRunLocation()
Gets or human-readable name of the run location.
Returns:
getSamplingPercentage
public Double getSamplingPercentage()
getVer
public int getVer()
Gets the ver value from the data object.
Overrides:
AvailabilityTelemetry.getVer()Returns:
isSuccess
public boolean isSuccess()
Gets a value indicating whether application handled the request successfully.
Returns:
setDuration
public void setDuration(Duration duration)
Sets the amount of time it took the application to handle the request.
Parameters:
setId
public void setId(String id)
Sets the unique identifier of the request.
Parameters:
setName
public void setName(String name)
Sets or human-readable name of the requested page.
Parameters:
setRunLocation
public void setRunLocation(String runLocation)
Sets or human-readable name of the run location.
Parameters:
setSamplingPercentage
public void setSamplingPercentage(Double samplingPercentage)
Parameters:
setSuccess
public void setSuccess(boolean success)
Sets a value indicating whether application handled the request successfully.
Parameters:
setTimestamp
public void setTimestamp(Date timestamp)
Sets the StartTime. Uses the default behavior and sets the property on the 'data' start time.
Overrides:
AvailabilityTelemetry.setTimestamp(Date timestamp)Parameters: