Enables export of metrics to OpenTelemetry. Since it keeps track of whether metrics are
enabled/disabled, it simplifies calling code by removing the need for tedious if clauses to check
whether metrics are enabled/disabled. Also, GlobalOpenTelemetry.get() should only be called after
client application has already installed the necessary meter provider.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-18 UTC."],[],[],null,["# Class TelemetryMetrics (3.16.2)\n\nVersion latestkeyboard_arrow_down\n\n- [3.16.2 (latest)](/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.16.1](/java/docs/reference/google-cloud-bigquerystorage/3.16.1/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.15.3](/java/docs/reference/google-cloud-bigquerystorage/3.15.3/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.14.1](/java/docs/reference/google-cloud-bigquerystorage/3.14.1/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.12.0](/java/docs/reference/google-cloud-bigquerystorage/3.12.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.11.4](/java/docs/reference/google-cloud-bigquerystorage/3.11.4/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.10.3](/java/docs/reference/google-cloud-bigquerystorage/3.10.3/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.9.3](/java/docs/reference/google-cloud-bigquerystorage/3.9.3/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.8.0](/java/docs/reference/google-cloud-bigquerystorage/3.8.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.6.1](/java/docs/reference/google-cloud-bigquerystorage/3.6.1/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.5.2](/java/docs/reference/google-cloud-bigquerystorage/3.5.2/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.4.0](/java/docs/reference/google-cloud-bigquerystorage/3.4.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.3.1](/java/docs/reference/google-cloud-bigquerystorage/3.3.1/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.2.0](/java/docs/reference/google-cloud-bigquerystorage/3.2.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.1.0](/java/docs/reference/google-cloud-bigquerystorage/3.1.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [3.0.1](/java/docs/reference/google-cloud-bigquerystorage/3.0.1/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [2.47.0](/java/docs/reference/google-cloud-bigquerystorage/2.47.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [2.45.0](/java/docs/reference/google-cloud-bigquerystorage/2.45.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [2.44.1](/java/docs/reference/google-cloud-bigquerystorage/2.44.1/com.google.cloud.bigquery.storage.v1.TelemetryMetrics)\n- [2.43.0](/java/docs/reference/google-cloud-bigquerystorage/2.43.0/com.google.cloud.bigquery.storage.v1.TelemetryMetrics) \n\n public class TelemetryMetrics\n\nEnables export of metrics to OpenTelemetry. Since it keeps track of whether metrics are\nenabled/disabled, it simplifies calling code by removing the need for tedious if clauses to check\nwhether metrics are enabled/disabled. Also, GlobalOpenTelemetry.get() should only be called after\nclient application has already installed the necessary meter provider. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e TelemetryMetrics \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nMethods\n-------\n\n### recordConnectionEnd(String errorCode)\n\n public void recordConnectionEnd(String errorCode)\n\n### recordConnectionStart()\n\n public void recordConnectionStart()\n\n### recordConnectionStartWithRetry()\n\n public void recordConnectionStartWithRetry()\n\n### recordNetworkLatency(Duration latency)\n\n public void recordNetworkLatency(Duration latency)\n\n### recordResponse(long messageSize, long rowCount, String errorCode, boolean isRetry)\n\n public void recordResponse(long messageSize, long rowCount, String errorCode, boolean isRetry)\n\n### refreshOpenTelemetryTableNameAttributes(String tableName)\n\n public void refreshOpenTelemetryTableNameAttributes(String tableName)"]]