Class CloudTasksClientMetrics

java.lang.Object
io.github.flink.gcp.connector.cloudtasks.CloudTasksClientMetrics

@Internal public final class CloudTasksClientMetrics extends Object
The Cloud Tasks client's RPC metrics, registered as rpcMethod.CreateTask.leaf on a component's metric group through an ClientMetrics.

The Cloud Tasks client has no metrics of its own. gax records them for it once the client's settings carry its public OpenTelemetryMetricsFactory (gax 2.87.0): one double histogram, gcp.client.request.duration in seconds, recorded once per call as it succeeds, fails or is cancelled, with the full gRPC method name as rpc.method. A call is gax's whole operation, retries included, but the client retries CreateTask on nothing, so each one is a single attempt. The histogram maps to its count and its millisecond sum.

The connector's components call one RPC through the client, so only CreateTask is registered.

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 Details

    • register

      public static ClientMetrics register(org.apache.flink.metrics.MetricGroup owner)
      Creates the client metrics and registers the CreateTask series on the owner's group. Call it when the component opens, before any reporter reads the group.
      Parameters:
      owner - the component's metric group
      Returns:
      the client metrics, which go to TaskCreatorFactory.create and which the task creator closes after its client