public final class RequestTelemetry extends BaseSampleSourceTelemetry<RequestData>
TelemetryClient
Constructor and Description |
---|
RequestTelemetry()
Initializes a new instance of the HttpRequestTelemetry class.
|
RequestTelemetry(java.lang.String name,
java.util.Date timestamp,
Duration duration,
java.lang.String responseCode,
boolean success)
Initializes a new instance of the HttpRequestTelemetry class with the given name,
time stamp, duration, HTTP response code and success property values.
|
RequestTelemetry(java.lang.String name,
java.util.Date timestamp,
long duration,
java.lang.String responseCode,
boolean success)
Initializes a new instance of the HttpRequestTelemetry class with the given name,
time stamp, duration, HTTP response code and success property values.
|
Modifier and Type | Method and Description |
---|---|
protected void |
additionalSanitize()
Deprecated.
|
java.lang.String |
getBaseTypeName() |
protected RequestData |
getData()
Concrete classes should implement this method which supplies the
data structure that this instance works with, which needs to implement
JsonSerializable |
Duration |
getDuration()
Gets the amount of time it took the application to handle the request.
|
java.lang.String |
getEnvelopName() |
java.lang.String |
getHttpMethod()
Deprecated.
Gets the HTTP method of the request.
|
java.lang.String |
getId()
Gets the unique identifier of the request.
|
java.lang.String |
getName()
Gets or human-readable name of the requested page.
|
java.lang.String |
getResponseCode()
Gets response code returned by the application after handling the request.
|
java.lang.Double |
getSamplingPercentage() |
java.lang.String |
getSource()
Gets the source for the request telemetry object.
|
java.net.URL |
getUrl()
Gets request url (optional).
|
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 |
setHttpMethod(java.lang.String httpMethod)
Deprecated.
Sets the HTTP method of the request.
|
void |
setId(java.lang.String id)
Sets the unique identifier of the request.
|
void |
setName(java.lang.String name)
Sets or human-readable name of the requested page.
|
void |
setResponseCode(java.lang.String responseCode)
Sets response code returned by the application after handling the request.
|
void |
setSamplingPercentage(java.lang.Double samplingPercentage) |
void |
setSource(java.lang.String value)
Sets the source for the request telemetry object.
|
void |
setSuccess(boolean success)
Sets a value indicating whether application handled the request successfully.
|
void |
setTimestamp(java.util.Date timestamp)
Sets the StartTime.
|
void |
setUrl(java.lang.String url)
Sets request url.
|
void |
setUrl(java.net.URL url)
Sets request url
|
reset, setSampleRate
getContext, getProperties, getSequence, getTimestamp, initialize, sanitize, serialize, setSequence
public RequestTelemetry()
public RequestTelemetry(java.lang.String name, java.util.Date timestamp, long duration, java.lang.String responseCode, boolean success)
name
- A user-friendly name for the request.timestamp
- The time of the request.duration
- The duration, in milliseconds, of the request processing.responseCode
- The HTTP response code.success
- 'true' if the request was a success, 'false' otherwise.public RequestTelemetry(java.lang.String name, java.util.Date timestamp, Duration duration, java.lang.String responseCode, boolean success)
name
- A user-friendly name for the request.timestamp
- The time of the request.duration
- The duration, as an Duration
instance, of the request processing.responseCode
- The HTTP response code.success
- 'true' if the request was a success, 'false' otherwise.public void setTimestamp(java.util.Date timestamp)
setTimestamp
in interface Telemetry
setTimestamp
in class BaseTelemetry<RequestData>
timestamp
- he timestamp as Date.public java.lang.String getName()
public void setName(java.lang.String name)
name
- A human-readable namepublic java.lang.String getId()
public void setId(java.lang.String id)
id
- Unique identifierpublic java.lang.String getResponseCode()
public void setResponseCode(java.lang.String responseCode)
responseCode
- Application's response codepublic java.lang.String getSource()
public void setSource(java.lang.String value)
value
- The value of the Source property.public boolean isSuccess()
public void setSuccess(boolean success)
success
- Success indicationpublic Duration getDuration()
public void setDuration(Duration duration)
duration
- Amount of time in captured in a Duration
.public java.net.URL getUrl() throws java.net.MalformedURLException
java.net.MalformedURLException
- if the url is malformedpublic void setUrl(java.net.URL url)
url
- The URLpublic void setUrl(java.lang.String url) throws java.net.MalformedURLException
url
- The url to storejava.net.MalformedURLException
- If the url is malformed@Deprecated public java.lang.String getHttpMethod()
@Deprecated public void setHttpMethod(java.lang.String httpMethod)
httpMethod
- The HTTP methodpublic java.lang.Double getSamplingPercentage()
public void setSamplingPercentage(java.lang.Double samplingPercentage)
@Deprecated protected void additionalSanitize()
BaseTelemetry
additionalSanitize
in class BaseTelemetry<RequestData>
protected RequestData getData()
BaseTelemetry
JsonSerializable
getData
in class BaseTelemetry<RequestData>
public java.lang.String getEnvelopName()
getEnvelopName
in class BaseTelemetry<RequestData>
public java.lang.String getBaseTypeName()
getBaseTypeName
in class BaseTelemetry<RequestData>