org.raystack.depot.metrics.BigTableMetrics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of depot Show documentation
Show all versions of depot Show documentation
A sink connector library containing multiple sink implementations
The newest version!
package org.raystack.depot.metrics;
import org.raystack.depot.config.SinkConfig;
public class BigTableMetrics extends SinkMetrics {
public static final String BIGTABLE_SINK_PREFIX = "bigtable_";
public static final String BIGTABLE_INSTANCE_TAG = "instance=%s";
public static final String BIGTABLE_TABLE_TAG = "table=%s";
public static final String BIGTABLE_ERROR_TAG = "error=%s";
public BigTableMetrics(SinkConfig config) {
super(config);
}
public enum BigTableErrorType {
QUOTA_FAILURE, // A quota check failed.
PRECONDITION_FAILURE, // Some preconditions have failed.
BAD_REQUEST, // Violations in a client request
RPC_FAILURE,
}
public String getBigtableOperationLatencyMetric() {
return getApplicationPrefix() + SINK_PREFIX + BIGTABLE_SINK_PREFIX + "operation_latency_milliseconds";
}
public String getBigtableOperationTotalMetric() {
return getApplicationPrefix() + SINK_PREFIX + BIGTABLE_SINK_PREFIX + "operation_total";
}
public String getBigtableTotalErrorsMetrics() {
return getApplicationPrefix() + SINK_PREFIX + BIGTABLE_SINK_PREFIX + "errors_total";
}
}