common/src/main/java/bio/terra/cloudres/common/OperationAnnotator.java
/**
   * Records the information captured in {@link OperationData} via logs, tracing and metrics.
   *
   * <p>This method should be used to capture the result of an already-executed cloud operation.
   * {@link #executeCowOperation(CloudOperation, CowExecute, CowSerialize)} or {@link
   * #executeCheckedCowOperation(CloudOperation, CowCheckedExecute, CowSerialize)} should be used to
   * actually execute the operation and record resulting data.
   *
   * @param operationData the {@link OperationData} to record.
   */
Records the information captured in  OperationData via logs, tracing and metrics.
This method should be used to capture the result of an already-executed cloud operation.

@param operationData the  OperationData to record.
Records the information captured in OperationData via logs tracing and metrics . This method should be used to capture the result of an already - executed cloud operation . @param operationData the OperationData to record .
public void recordOperation(OperationData operationData) {
    recordApiCount(operationData.cloudOperation());
    recordLatency(operationData.duration(), operationData.cloudOperation());
    recordErrors(operationData.httpStatusCode(), operationData.cloudOperation());
    tracer
        .getCurrentSpan()
        .putAttribute(
            HttpTraceAttributeConstants.HTTP_STATUS_CODE,
            AttributeValue.longAttributeValue(operationData.httpStatusCode().orElse(-1)));
    logEvent(operationData);
  }
public void recordOperation ( OperationData operationData ) { recordApiCount ( operationData . cloudOperation ( ) ) ; recordLatency ( operationData . duration ( ) , operationData . cloudOperation ( ) ) ; recordErrors ( operationData . httpStatusCode ( ) , operationData . cloudOperation ( ) ) ; tracer . getCurrentSpan ( ) . putAttribute ( HttpTraceAttributeConstants . HTTP_STATUS_CODE , AttributeValue . longAttributeValue ( operationData . httpStatusCode ( ) . orElse ( - 1 ) ) ) ; logEvent ( operationData ) ; }
Records the information captured in {@link OperationData} via logs, tracing and metrics.
Records the information captured in { @link OperationData } via logs tracing and metrics .
// Record the Cloud API usage as a metric // Record the latency as a metric // Record errors as a metric // Trace the http status code // Log the event