Skip to content

Commit

Permalink
add toString
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Feb 21, 2024
1 parent db6c496 commit 8f511cf
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ public static void enableBuiltinMetrics() throws IOException {}
* now. Please refer {@link BigtableDataSettings.Builder#setMetricsProvider(MetricsProvider)}
* on how to enable or disable built-in metrics.
*/
@Deprecated
public static void enableBuiltinMetrics(Credentials credentials) throws IOException {
BigtableDataSettings.legacyMetricCredentialOverride = credentials;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private void recordAttemptCompletion(@Nullable Throwable status) {
}
}

private double convertToMs(long nanoSeconds) {
private static double convertToMs(long nanoSeconds) {
double toMs = 1e-6;
return nanoSeconds * toMs;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,9 @@ private CustomOpenTelemetryMetricsProvider(OpenTelemetry otel) {
public OpenTelemetry getOpenTelemetry() {
return otel;
}

@Override
public String toString() {
return otel.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ public final class DefaultMetricsProvider implements MetricsProvider {
public static DefaultMetricsProvider INSTANCE = new DefaultMetricsProvider();

private DefaultMetricsProvider() {}

@Override
public String toString() {
return "DefaultMetricsProvider";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ public final class NoopMetricsProvider implements MetricsProvider {
public static NoopMetricsProvider INSTANCE = new NoopMetricsProvider();

private NoopMetricsProvider() {}

@Override
public String toString() {
return "NoopMetricsProvider";
}
}

0 comments on commit 8f511cf

Please sign in to comment.