CosmosDiagnosticsRequestInfo Class

  • java.lang.Object
    • com.azure.cosmos.CosmosDiagnosticsRequestInfo

public final class CosmosDiagnosticsRequestInfo

This class represents diagnostic information for transport requests (calls to a replica in direct mode, calls to the Gateway for example to get metadata like physical addresses of replica for a partition.

Method Summary

Modifier and Type Method and Description
String getActivityId()

Gets the Activity used to track this request in the Cosmos DB service.

Duration getBackendLatency()

Gets the backend latency if available or null when backend latency isn't available for a request

Duration getDuration()

Gets the total duration for processing this request.

String getPartitionId()

Gets the identifier for the physical partition/shard this request was processed in or null when the request was not targeting a replica/partition directly.

String getPartitionKeyRangeId()

Gets the PartitionKeyRangeId for the physical partition/shard this request was processed in or null when the request was not targeting a replica/partition directly.

Collection<CosmosDiagnosticsRequestEvent> getRequestPipelineEvents()

Gets more granular information about different stages of the request pipeline.

String getRequestType()

Gets the type of request

Instant getStartTime()

Gets the start time of the request.

Methods inherited from java.lang.Object

Method Details

getActivityId

public String getActivityId()

Gets the Activity used to track this request in the Cosmos DB service.

Returns:

the Activity used to track this request in the Cosmos DB service.

getBackendLatency

public Duration getBackendLatency()

Gets the backend latency if available or null when backend latency isn't available for a request

Returns:

the backend latency if available or null when backend latency isn't available for a request

getDuration

public Duration getDuration()

Gets the total duration for processing this request.

Returns:

the total duration for processing this request.

getPartitionId

public String getPartitionId()

Gets the identifier for the physical partition/shard this request was processed in or null when the request was not targeting a replica/partition directly.

Returns:

the identifier for the physical partition/shard this request was processed in or null when the request was not targeting a replica/partition directly.

getPartitionKeyRangeId

public String getPartitionKeyRangeId()

Gets the PartitionKeyRangeId for the physical partition/shard this request was processed in or null when the request was not targeting a replica/partition directly.

Returns:

the PartitionKeyRangeId for the physical partition/shard this request was processed in or null when the request was not targeting a replica/partition directly.

getRequestPipelineEvents

public Collection getRequestPipelineEvents()

Gets more granular information about different stages of the request pipeline.

Returns:

more granular information about different stages of the request pipeline.

getRequestType

public String getRequestType()

Gets the type of request

Returns:

the type of the request

getStartTime

public Instant getStartTime()

Gets the start time of the request.

Returns:

the start time of the request.

Applies to