sample-apps/spark-awssdkv1/src/main/java/com/amazon/sampleapp/MetricEmitter.java [10:38]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class MetricEmitter {

  static final AttributeKey<String> DIMENSION_API_NAME = AttributeKey.stringKey("apiName");
  static final AttributeKey<String> DIMENSION_STATUS_CODE = AttributeKey.stringKey("statusCode");

  static String API_COUNTER_METRIC = "apiBytesSent";
  static String API_LATENCY_METRIC = "latency";
  static String API_SUM_METRIC = "totalApiBytesSent";
  static String API_LAST_LATENCY_METRIC = "lastLatency";
  static String API_UP_DOWN_COUNTER_METRIC = "queueSizeChange";
  static String API_UP_DOWN_SUM_METRIC = "actualQueueSize";

  DoubleHistogram apiLatencyRecorder;
  LongCounter totalBytesSentObserver;

  long apiBytesSent;
  long queueSizeChange;

  long totalBytesSent;
  long apiLastLatency;
  long actualQueueSize;

  // The below API name and status code dimensions are currently shared by all metrics observer in
  // this class.
  String apiNameValue = "";
  String statusCodeValue = "";

  public MetricEmitter() {
    Meter meter =
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sample-apps/spark/src/main/java/com/amazon/sampleapp/MetricEmitter.java [10:38]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class MetricEmitter {

  static final AttributeKey<String> DIMENSION_API_NAME = AttributeKey.stringKey("apiName");
  static final AttributeKey<String> DIMENSION_STATUS_CODE = AttributeKey.stringKey("statusCode");

  static String API_COUNTER_METRIC = "apiBytesSent";
  static String API_LATENCY_METRIC = "latency";
  static String API_SUM_METRIC = "totalApiBytesSent";
  static String API_LAST_LATENCY_METRIC = "lastLatency";
  static String API_UP_DOWN_COUNTER_METRIC = "queueSizeChange";
  static String API_UP_DOWN_SUM_METRIC = "actualQueueSize";

  DoubleHistogram apiLatencyRecorder;
  LongCounter totalBytesSentObserver;

  long apiBytesSent;
  long queueSizeChange;

  long totalBytesSent;
  long apiLastLatency;
  long actualQueueSize;

  // The below API name and status code dimensions are currently shared by all metrics observer in
  // this class.
  String apiNameValue = "";
  String statusCodeValue = "";

  public MetricEmitter() {
    Meter meter =
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



