Class BigtableClientMetrics
rpcMethod.METHOD.leaf on a component's
metric group through an ClientMetrics.
The instruments are the public block google-cloud-bigtable records into an injected
OpenTelemetry (2.85.0, MetricRegistry.newUserRecorderRegistry). The client
records its other instruments, the per-connection and channel-pool ones, only into its built-in
Cloud Monitoring exporter. A histogram maps to its count and its millisecond sum, except for the
two the client records at most once per operation, which keep only their sums: application
latency, recorded for every operation, so its count would repeat operations, and
first-response latency, recorded only for a streamed ReadRows and for operations served
on the session path (BuiltinMetricsTracer and VRpcTracerImpl).
throttling_latencies is not mapped. In 2.85.0 the client adds a batch's flow-control
wait to that total in milliseconds and then records the total as nanoseconds, and it never resets
the total between attempts (BuiltinMetricsTracer), so the value is neither a duration in
its unit nor per attempt. Map it once a client release records it correctly.
This file is a [[subgroups]] source of scripts/config/metric-docs.toml: the
group and every leaf below are read from it, so each leaf owes a row on the connector's page.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClientMetricsCreates the client metrics and registers every series of the given methods on the owner's group.static ClientMetricsregisterForEnumerators(org.apache.flink.metrics.groups.SplitEnumeratorMetricGroup group, String... methods) Returns the client metrics of a source's enumerators: created on the enumerator metric group the first time and handed to every later enumerator built on the same group, with the series of each given method registered once.
-
Method Details
-
register
Creates the client metrics and registers every series of the given methods on the owner's group. Call it when the component opens, before any reporter reads the group.- Parameters:
owner- the component's metric groupmethods- the RPC methods the component's client calls, without theBigtable.prefix, such asMutateRows- Returns:
- the client metrics, whose
ClientMetrics.openTelemetry()goes to the client; closing them, after the client, only freezes the counters, which a component whose metric group ends with it need not do
-
registerForEnumerators
@Nullable public static ClientMetrics registerForEnumerators(@Nullable org.apache.flink.metrics.groups.SplitEnumeratorMetricGroup group, String... methods) Returns the client metrics of a source's enumerators: created on the enumerator metric group the first time and handed to every later enumerator built on the same group, with the series of each given method registered once.A coordinator reset builds the next enumerator on the group the first one registered on, where a second registration of a name would be dropped and the series would freeze; see
EnumeratorMetrics. Shared, they keep counting across resets. Each method is registered on its own, so the sub-sources of aHybridSource, which share one group, each get the series of the methods they call. The client metrics are never closed: a client an enumerator is still closing may record into them, which is no error.- Parameters:
group- the enumerator's metric group, ornullwhere the context offers nonemethods- the RPC methods the enumerators' clients call, without theBigtable.prefix- Returns:
- the shared client metrics, or
nullwhere there is no group
-