Class CosmosMetricCategory

java.lang.Object
com.azure.cosmos.models.CosmosMetricCategory

public final class CosmosMetricCategory extends Object
Categories for Cosmos DB client-side metrics
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    All metrics enabled
    Default metrics (categories OperationSummary, RequestSummary, System, DirectChannels and DirectRequests) enabled.
    The metrics in the AddressResolutions category emit metrics for calls made to get replica addresses for a certain physical partition when using direct mode.
    The metrics in the DirectChannels category emit metrics allowing to monitor connection handling by service endpoint.
    The metrics in the DirectEndpoints category emit metrics allowing to monitor state by service endpoint.
    The metrics in the DirectRequests category emit metrics allowing to monitor requests by service endpoint (request rate, error rate, latency etc.).
    The metrics in the Legacy category emit metrics that should not be used anymore and exist only for backwards compatibility reasons.
    Minimum set of metrics (categories OperationSummary and System) enabled.
    The metrics in the OperationDetails category emit additional end-to-end metrics (like item count) for SDK operations.
    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.
    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.
    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.
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Gets the corresponding metric category state from its string representation.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • 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
    • 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_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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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
    • 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.
  • Method Details

    • fromString

      public static CosmosMetricCategory fromString(String name)
      Gets the corresponding metric category state from its string representation.
      Parameters:
      name - The name of the Cosmos metric category to convert.
      Returns:
      The corresponding Cosmos metric category.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object