AvailabilityTelemetry 类

  • java.lang.Object
    • com.microsoft.applicationinsights.telemetry.BaseTelemetry
      • com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry
        • com.microsoft.bot.applicationinsights.AvailabilityTelemetry

public final class AvailabilityTelemetry
extends com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry<com.microsoft.applicationinsights.internal.schemav2.AvailabilityData>

我们从 https://github.com/microsoft/ApplicationInsights-Java/issues/1099 中取了此类,因为尚未在 ApplicationInsights-Java 库中迁移此类。

字段摘要

修饰符和类型 字段和描述
static final java.lang.String BASE_TYPE
static final java.lang.String ENVELOPE_NAME

构造函数摘要

构造函数 说明
AvailabilityTelemetry()

初始化可用性遥测类的新实例。

AvailabilityTelemetry(String name, Duration duration, String runLocation, String message, boolean success, ConcurrentMap<String,Double> measurements, ConcurrentMap<String,String> properties)

使用给定的名称、时间戳、持续时间、HTTP 响应代码和成功属性值初始化 AvailabilityTelemetry 类的新实例。

方法摘要

修饰符和类型 方法和描述
protected void additionalSanitize()
java.lang.String getBaseTypeName()
protected com.microsoft.applicationinsights.internal.schemav2.AvailabilityData getData()
com.microsoft.applicationinsights.telemetry.Duration getDuration()

获取应用程序处理请求所花费的时间。

java.lang.String getEnvelopName()
java.lang.String getId()

获取请求的唯一标识符。

java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Double> getMetrics()

获取应用程序定义的请求指标的映射。

java.lang.String getName()

获取或可读请求的页面的名称。

java.lang.String getRunLocation()

获取或可读的运行位置的名称。

java.lang.Double getSamplingPercentage()
int getVer()

从数据对象获取 ver 值。

boolean isSuccess()

获取一个值,该值指示应用程序是否成功处理了请求。

void setDuration(Duration duration)

设置应用程序处理请求所花费的时间。

void setId(String id)

设置请求的唯一标识符。

void setName(String name)

设置或可读请求页面的名称。

void setRunLocation(String runLocation)

设置或可读的运行位置的名称。

void setSamplingPercentage(Double samplingPercentage)
void setSuccess(boolean success)

设置一个值,该值指示应用程序是否成功处理了请求。

void setTimestamp(Date timestamp)

设置开始时间。

方法继承自 com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry

com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry.reset com.microsoft.applicationinsights.telemetry.BaseSampleSourceTelemetry.setSampleRate

方法继承自 com.microsoft.applicationinsights.telemetry.BaseTelemetry

com.microsoft.applicationinsights.telemetry.BaseTelemetry.additionalSanitize com.microsoft.applicationinsights.telemetry.BaseTelemetry.getBaseTypeName com.microsoft.applicationinsights.telemetry.BaseTelemetry.getContext com.microsoft.applicationinsights.telemetry.BaseTelemetry.getData com.microsoft.applicationinsights.telemetry.BaseTelemetry.getEnvelopName com.microsoft.applicationinsights.telemetry.BaseTelemetry.getProperties com.microsoft.applicationinsights.telemetry.BaseTelemetry.getSequence com.microsoft.applicationinsights.telemetry.BaseTelemetry.getTelemetryName com.microsoft.applicationinsights.telemetry.BaseTelemetry.getTimestamp com.microsoft.applicationinsights.telemetry.BaseTelemetry.getVer com.microsoft.applicationinsights.telemetry.BaseTelemetry.initialize com.microsoft.applicationinsights.telemetry.BaseTelemetry.normalizeInstrumentationKey com.microsoft.applicationinsights.telemetry.BaseTelemetry.sanitize com.microsoft.applicationinsights.telemetry.BaseTelemetry.serialize com.microsoft.applicationinsights.telemetry.BaseTelemetry.setSequence com.microsoft.applicationinsights.telemetry.BaseTelemetry.setTimestamp com.microsoft.applicationinsights.telemetry.BaseTelemetry.toString

方法继承自 java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

字段详细信息

BASE_TYPE

public static final String BASE_TYPE

ENVELOPE_NAME

public static final String ENVELOPE_NAME

构造函数详细信息

AvailabilityTelemetry

public AvailabilityTelemetry()

初始化 AvailabilityTelemetry 类的新实例。

AvailabilityTelemetry

public AvailabilityTelemetry(String name, Duration duration, String runLocation, String message, boolean success, ConcurrentMap measurements, ConcurrentMap properties)

使用给定的名称、时间戳、持续时间、HTTP 响应代码和成功属性值初始化 AvailabilityTelemetry 类的新实例。

参数:

name - 请求的用户友好名称。
duration - 请求的时间。
runLocation - 请求处理的持续时间(以毫秒为单位)。
message - HTTP 响应代码。
success - 如果请求成功,则为“true”,否则为“false”。
measurements - 度量值。
properties - 相应的属性。

方法详细信息

additionalSanitize


protected void additionalSanitize()

替代:

AvailabilityTelemetry.additionalSanitize()

getBaseTypeName

public String getBaseTypeName()

替代:

AvailabilityTelemetry.getBaseTypeName()

getData

protected AvailabilityData getData()

替代:

AvailabilityTelemetry.getData()

getDuration

public Duration getDuration()

获取应用程序处理请求所花费的时间。

返回:

以毫秒为单位的时间量。

getEnvelopName

public String getEnvelopName()

替代:

AvailabilityTelemetry.getEnvelopName()

getId

public String getId()

获取请求的唯一标识符。

返回:

唯一标识符。

getMetrics

public ConcurrentMap getMetrics()

获取应用程序定义的请求指标的映射。

返回:

指标映射

getName

public String getName()

获取或可读请求的页面的名称。

返回:

可读名称。

getRunLocation

public String getRunLocation()

获取或可读的运行位置的名称。

返回:

可读名称。

getSamplingPercentage

public Double getSamplingPercentage()

getVer

public int getVer()

从数据对象获取 ver 值。

替代:

AvailabilityTelemetry.getVer()

返回:

ver 值。

isSuccess

public boolean isSuccess()

获取一个值,该值指示应用程序是否成功处理了请求。

返回:

成功指示。

setDuration

public void setDuration(Duration duration)

设置应用程序处理请求所花费的时间。

参数:

duration - 在 com.microsoft.applicationinsights.telemetry.Duration中捕获的时间量。

setId

public void setId(String id)

设置请求的唯一标识符。

参数:

id - 唯一标识符。

setName

public void setName(String name)

设置或可读请求页面的名称。

参数:

name - 可读名称。

setRunLocation

public void setRunLocation(String runLocation)

设置或可读的运行位置的名称。

参数:

runLocation - 可读名称

setSamplingPercentage

public void setSamplingPercentage(Double samplingPercentage)

参数:

samplingPercentage

setSuccess

public void setSuccess(boolean success)

设置一个值,该值指示应用程序是否成功处理了请求。

参数:

success - 成功指示。

setTimestamp

public void setTimestamp(Date timestamp)

设置 StartTime。 使用默认行为,并设置“data”开始时间的属性。

替代:

AvailabilityTelemetry.setTimestamp(Date timestamp)

参数:

timestamp - 时间戳作为日期。

适用于