이 페이지에서는 기본 제공 클라이언트 측 측정항목으로 변경된 클라이언트 측 측정항목에 대해 설명합니다. 이 페이지는 여전히 기존 측정항목을 사용하는 모든 개발자를 위한 참조로 유지됩니다.
이 페이지에 설명된 기존 측정항목 대신 클라이언트 측 측정항목 개요에 설명된 기본 제공 클라이언트 측 측정항목을 사용하는 것이 좋습니다.
측정항목 사용 설정
이 정보는 기존 측정항목을 사용하는 고객을 위해 제공됩니다. 최신 기본 제공 클라이언트 측 측정항목을 사용 설정하려면 클라이언트 측 측정항목 설정을 참조하세요.
자바용 Cloud Bigtable HBase 클라이언트는 Dropwizard 측정항목을 사용하여 클라이언트 측 측정항목을 수집하고 보고합니다. 측정항목을 수집하면 각 요청에 매우 짧은 지연 시간(10마이크로초 미만)이 추가될 수 있기 때문에 측정항목은 기본적으로 사용 설정되지 않습니다. 다음 섹션에서는 기존 클라이언트 측 측정항목을 사용 설정하는 방법을 설명합니다.
Log4j 보고자 사용
기존 클라이언트 측 측정항목을 사용 설정하는 가장 간단한 방법은 Log4j 구성 파일에 다음 줄을 추가하는 것입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis document outlines the legacy client-side metrics for the Cloud Bigtable HBase client for Java, which utilizes Dropwizard Metrics for data collection.\u003c/p\u003e\n"],["\u003cp\u003eThe use of built-in client-side metrics is recommended instead of these legacy metrics, with instructions provided for enabling the newer metrics.\u003c/p\u003e\n"],["\u003cp\u003eLegacy metrics can be enabled through a Log4j configuration or by using other reporters like Graphite, and these metrics cover areas such as channel activity, RPC performance, and data method latencies.\u003c/p\u003e\n"],["\u003cp\u003eDifferent types of metrics are available, including counters, meters, and timers, which track various aspects of client operations like active sessions, RPC throughput, and operation latencies.\u003c/p\u003e\n"],["\u003cp\u003eMetrics related to specific operations like \u003ccode\u003ePut\u003c/code\u003e requests provide insight into latency and performance, with the example of a Put request showcasing the specific counters, meters, and timers that are collected.\u003c/p\u003e\n"]]],[],null,["Legacy HBase client-side metrics\n\nThis page describes a set of client-side metrics that has been replaced with\nbuilt-in client-side metrics. This page is maintained as a\nreference for any developers who still use the legacy metrics.\n\n**We recommend using the built-in client-side metrics described on the\n[Client-side metrics overview](/bigtable/docs/client-side-metrics) instead of\nthe legacy metrics described on this page.**\n\nEnable metrics\n\nThis information is provided for customers who are using the legacy metrics. To\nenable the newer, built-in client-side metrics, see [Set up client-side\nmetrics](/bigtable/docs/client-side-metrics-setup).\n\nThe Cloud Bigtable HBase client for Java used [Dropwizard\nMetrics](http://metrics.dropwizard.io/) to collect and report client-side metrics. Because\ncollecting metrics can add a very small amount of latency (single-digit\nmicroseconds) to each request, metrics were not enabled by default. The following\nsections explain how to enable the legacy client-side metrics.\n\nUse the Log4j reporter\n\nThe simplest way to enable the legacy client-side metrics is to add the\nfollowing line to your [Log4j](https://logging.apache.org/log4j/) configuration file: \n\n log4j.category.com.google.cloud.bigtable.metrics=DEBUG\n\nThis configuration setting turns on metrics collection and logs\nBigtable metrics with an [SLF4J logger](http://metrics.dropwizard.io/3.1.0/manual/core/#man-core-reporters-slf4j).\n\nUse other reporters\n\nYou can use other types of reporters by updating your application's code. For\nexample, here is a reporter that sends metrics to a [Graphite](https://graphiteapp.org/) server: \n\n Graphite pickledGraphite = new PickledGraphite(new InetSocketAddress(\"graphite.example.com\", 2004));\n DropwizardMetricRegistry registry = new DropwizardMetricRegistry();\n GraphiteReporter reporter =\n GraphiteReporter.forRegistry(registry.getRegistry())\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.MILLISECONDS)\n .filter(MetricFilter.ALL)\n .build(pickledGraphite);\n reporter.start(1, TimeUnit.MINUTES);\n BigtableClientMetrics.setMetricRegistry(registry);\n\nDropwizard Metrics [provides reporters](http://metrics.dropwizard.io/3.1.0/manual/core/#reporters) for JMX,\nconsole logging, SLF4J, and CSV. There are also a variety of [third-party\nreporters](http://metrics.dropwizard.io/3.1.0/manual/third-party/) available.\n\nAvailable metrics\n\nThis section describes the metrics that are available when the legacy HBase\nclient-side metrics are enabled. Each metric has one of the following types:\n\n- **Counter**: A cumulative count per Java virtual machine (JVM).\n- **Meter**: Count information plus throughput information (a count per the last minute, 5 minutes, or 15 minutes)\n- **Timer**: Meter information plus latency information (such as median, mean, and 95th percentile)\n\nOnly certain metrics are collected for each type of request. See \"[Example:\nMetrics for a `Put` request\"](#put-metrics) for an example of the metrics that\nare collected during a `Put` request.\n\nChannel-level metrics\n\n| Type | Name | Description |\n|---------|---------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| Counter | `google-cloud-bigtable.sessions.active` | How many `BigtableSession`s are opened. Each HBase `Connection` has a single `BigtableSession`. |\n| Counter | `google-cloud-bigtable.grpc.channel.active` | How many lower-level gRPC/Netty channels are opened. Each `BigtableSession` has many gRPC channels. |\n\nGeneral RPC metrics\n\n| Type | Name | Description |\n|---------|--------------------------------------------|------------------------------------------------------------------------|\n| Counter | `google-cloud-bigtable.grpc.rpc.active` | The number of remote procedure calls (RPCs) that are currently active. |\n| Meter | `google-cloud-bigtable.grpc.rpc.performed` | RPC throughput. |\n\nData method metrics\n\nData method metrics are collected for the following data methods:\n\n- `ReadRows`: Implements gets and scans.\n- `MutateRow`: Implements puts and deletes.\n- `MutateRows`: Implements bulk writes.\n- `CheckAndMutateRow`: Implements HBase's `checkAnd*` methods.\n- `ReadModifyWrite`: Implements HBase's `Append` and `Increment` methods.\n- `SampleRowKeys`: Retrieves region information that is used for MapReduce operations.\n\n| Type | Name | Description |\n|-------|---------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Timer | `google-cloud-bigtable.grpc.method.[METHOD_TYPE].operation.latency` | The length of time that individual operations take. Operations include the total amount of latency of all RPCs that are performed. (Usually only one RPC is performed. Client-side retries can cause the same RPC to be performed more than once if there is a transient error.) |\n| Timer | `google-cloud-bigtable.grpc.method.ReadRows.firstResponse.latency` | The length of time that it takes to receive the first response to a scan request. |\n| Meter | `google-cloud-bigtable.grpc.method.[METHOD_TYPE].retries.performed` | The number of retries that were performed. |\n| Meter | `google-cloud-bigtable.grpc.method.[METHOD_TYPE].failures` | The number of non-retryable failures. |\n| Meter | `google-cloud-bigtable.grpc.method.[METHOD_TYPE].retries.exhausted` | The number of times that retrying was aborted because too many retries had failed. |\n\nBulk metrics\n\nBulk metrics are provided for methods that return more than one response, such\nas a bulk write.\n\n| Type | Name | Description |\n|-------|--------------------------------------------------------|-----------------------------------------------------------------------------|\n| Meter | `google-cloud-bigtable.scanner.results` | The throughput of individual rows returned by a scan. |\n| Meter | `google-cloud-bigtable.bulk-mutator.mutations.added` | The throughput of individual mutations added for each `MutateRows` request. |\n| Meter | `google-cloud-bigtable.bulk-mutator.mutations.retried` | The number of individual mutations retried over time. |\n\nBigtable table metrics\n\nConverting Bigtable objects to HBase objects can add to the\nlatency of a request. The following timers can be correlated with the specified\n`*.operation.latency` timers to measure the cost of the conversion.\n\n| Type | Name | Description |\n|-------|-------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Timer | `google-cloud-bigtable.table.put.latency` | The length of time that individual `Put` operations take. Correlates with `google-cloud-bigtable.grpc.method.MutateRow.operation.latency`. |\n| Timer | `google-cloud-bigtable.table.get.latency` | The length of time that individual `Get` operations take. Correlates with `google-cloud-bigtable.grpc.method.ReadRows.operation.latency`. |\n\nExample: Metrics for a `Put` request\n\nWhen client-side metrics are enabled, the following metrics are collected for a\nsuccessful `Put` request that is not retried:\n\n- **Counter** : `google-cloud-bigtable.grpc.rpc.active`\n- **Meter** : `google-cloud-bigtable.grpc.rpc.performed`\n- **Timer** : `google-cloud-bigtable.grpc.method.MutateRow.operation.latency`\n- **Timer** : `google-cloud-bigtable.table.put.latency`\n\nCollecting these metrics adds approximately 1 microsecond (1/1000 of a\nmillisecond) to the `Put` operation. The overall `Put` operation could be as\nfast as 2 to 3 milliseconds, assuming that the operation includes about 1 KB of\ndata."]]