Class CosmosDiagnosticsRequestEvent

java.lang.Object
com.azure.cosmos.CosmosDiagnosticsRequestEvent

public final class CosmosDiagnosticsRequestEvent extends Object
This class represents diagnostic information for different steps in the request pipeline when processing a data plane request (for example to issue a point operation against a certain replica). This information can be useful to identify where in the request pipeline an error happened or latency was spent - for example whether high latency was due to the fact that a new channel (TCP connection with SSL handshake) needed to be created or because the transport took a long time due to network issues etc.
  • Method Details

    • getStartTime

      public Instant getStartTime()
      Gets the start time of the request pipeline event
      Returns:
      the start time of the request pipeline event
    • getDuration

      public Duration getDuration()
      Gets the duration for the request pipeline event - or null when the pipeline event hasn't finished (yet).
      Returns:
      the duration for the request pipeline event or null when the pipeline event hasn't finished (yet).
    • getEventName

      public String getEventName()
      Gets the name of the request pipeline event.
      Returns:
      the name of the request pipeline event.