CosmosMetricCategory Class
- java.
lang. Object - com.
azure. cosmos. models. CosmosMetricCategory
- com.
public final class CosmosMetricCategory
Categories for Cosmos DB client-side metrics
Modifier and Type | Field and Description |
---|---|
static final
Cosmos |
ALL
All metrics enabled |
static final
Cosmos |
DEFAULT
Default metrics (categories Operation |
static final
Cosmos |
DIRECT_ADDRESS_RESOLUTIONS
The metrics in the Address |
static final
Cosmos |
DIRECT_CHANNELS
The metrics in the Direct |
static final
Cosmos |
DIRECT_ENDPOINTS
The metrics in the Direct |
static final
Cosmos |
DIRECT_REQUESTS
The metrics in the Direct |
static final
Cosmos |
LEGACY
The metrics in the Legacy category emit metrics that should not be used anymore and exist only for backwards compatibility reasons. |
static final
Cosmos |
MINIMUM
Minimum set of metrics (categories Operation |
static final
Cosmos |
OPERATION_DETAILS
The metrics in the Operation |
static final
Cosmos |
OPERATION_SUMMARY
The metrics in the Operation |
static final
Cosmos |
REQUEST_DETAILS
The metrics in the Request |
static final
Cosmos |
REQUEST_SUMMARY
The metrics in the Request |
static final
Cosmos |
SYSTEM
The metrics in the system category emit metrics that reflect system-wide CPU and memory usage based on the same snapshots taken and logged in request diagnostics |
Modifier and Type | Method and Description |
---|---|
boolean | equals(Object obj) |
static
Cosmos |
from Gets the corresponding metric category state from its string representation. |
int |
hash |
String |
to |
Methods inherited from java.lang.Object
ALL
public static final CosmosMetricCategory ALL
All metrics enabled
DEFAULT
public static final CosmosMetricCategory DEFAULT
Default metrics (categories OperationSummary, RequestSummary, System, DirectChannels and DirectRequests) enabled. These metrics provide good overview of end-to-end telemetry and help with triaging for most common issues
DIRECT_ADDRESS_RESOLUTIONS
public static final CosmosMetricCategory DIRECT_ADDRESS_RESOLUTIONS
The metrics in the AddressResolutions category emit metrics for calls made to get replica addresses for a certain physical partition when using direct mode. A higher number of calls for a certain partition can indicate either network/connectivity issues or the fact that at least one of the replica in this partition has an issue.
DIRECT_CHANNELS
public static final CosmosMetricCategory DIRECT_CHANNELS
The metrics in the DirectChannels category emit metrics allowing to monitor connection handling by service endpoint. These metrics can be used to identify how many connections to a certain endpoint have been established, closed or are currently active. This information can help triaging whether there are any connectivity/network issues for certain endpoints (high number of closed/re-opened connections).
DIRECT_ENDPOINTS
public static final CosmosMetricCategory DIRECT_ENDPOINTS
The metrics in the DirectEndpoints category emit metrics allowing to monitor state by service endpoint. These metrics can be used to identify when a service endpoint was evicted (due to reaching idle time threshold etc.). In most cases it should be sufficient to monitor DirectChannels instead.
DIRECT_REQUESTS
public static final CosmosMetricCategory DIRECT_REQUESTS
The metrics in the DirectRequests category emit metrics allowing to monitor requests by service endpoint (request rate, error rate, latency etc.). These metrics can be used to triage whether high latency or error rate is caused by a certain endpoint.
LEGACY
public static final CosmosMetricCategory LEGACY
The metrics in the Legacy category emit metrics that should not be used anymore and exist only for backwards compatibility reasons.
MINIMUM
public static final CosmosMetricCategory MINIMUM
Minimum set of metrics (categories OperationSummary and System) enabled. These metrics provide a basic overview of end-to-end telemetry but won't be sufficient for triaging most issues
OPERATION_DETAILS
public static final CosmosMetricCategory OPERATION_DETAILS
The metrics in the OperationDetails category emit additional end-to-end metrics (like item count) for SDK operations.
OPERATION_SUMMARY
public static final CosmosMetricCategory OPERATION_SUMMARY
The metrics in the OperationSummary category emit most important end-to-end metrics (like latency, request rate, request charge, request- and response-payload size etc.) for SDK operations These metrics are intended to visualize health state and impact - but alone not sufficient for triaging issues.
REQUEST_DETAILS
public static final CosmosMetricCategory REQUEST_DETAILS
The metrics in the RequestDetails category emit additional end-to-end metrics (like timeline metrics showing where in the request pipeline latency was spent etc.) for physical network requests - they have tags allowing to distinguish by service endpoint in the backend as well as the client-machine. So, these metrics can be very useful to triage whether impact (high latency, error rate) is skewed around certain client-machines and/or backend service endpoints.
REQUEST_SUMMARY
public static final CosmosMetricCategory REQUEST_SUMMARY
The metrics in the RequestSummary category emit most important end-to-end metrics (like latency, request rate, request charge, request- and response-payload size etc.) for physical network requests - they have tags allowing to distinguish by service endpoint in the backend as well as the client-machine. So, these metrics can be very useful to triage whether impact (high latency, error rate) is skewed around certain client-machines and/or backend service endpoints.
SYSTEM
public static final CosmosMetricCategory SYSTEM
The metrics in the system category emit metrics that reflect system-wide CPU and memory usage based on the same snapshots taken and logged in request diagnostics
equals
public boolean equals(Object obj)
Overrides:
CosmosMetricCategory.equals(Object obj)Parameters:
fromString
public static CosmosMetricCategory fromString(String name)
Gets the corresponding metric category state from its string representation.
Parameters:
Returns:
hashCode
public int hashCode()
Overrides:
CosmosMetricCategory.hashCode()toString
public String toString()
Overrides:
CosmosMetricCategory.toString()