Flink metrics for Cloudera Streaming Analytics
When the compute cluster has an observability gateway, each Flink job that Cloudera SQL Stream Builder (SSB) starts exports its Flink runtime metrics to Anywhere Cloud through OpenTelemetry. You do not need to set up a metrics reporter.
How Flink metrics are exported
When the compute cluster of the deployment has an observability gateway, SSB adds an OpenTelemetry metrics reporter to every Flink job that it starts. Without an observability gateway, SSB does not export metrics. The reporter works as follows:
| Setting | Value |
|---|---|
| Protocol | OpenTelemetry Protocol (OTLP) over gRPC |
| Destination | The observability gateway of the compute cluster |
| Interval | Every 10 seconds |
| Metrics | The Flink system metrics of the JobManager and the TaskManagers of the job |
Each metric carries the following resource attributes, which you can use to filter the metrics of one deployment or one job:
| Attribute | Value |
|---|---|
service.name |
The name of the Cloudera Streaming Analytics engine instance |
service.namespace |
csa |
k8s.namespace.name |
The Kubernetes namespace of the job |
k8s.pod.name |
The pod of the JobManager or the TaskManager that reported the metric |
SSB exports all Flink system metrics to the observability gateway, and Cloudera Streaming Analytics uses the telemetry settings of the compute cluster automatically. The metrics go to the destinations that your platform administrator chose in those settings. Your platform administrator can tell you where to view them.
Telemetry in Anywhere Cloud
For how Anywhere Cloud collects and routes logs, metrics, and audit records, see Telemetry Engine in the Anywhere Cloud documentation.
Metrics to watch for SQL jobs
Flink reports hundreds of metrics. The following metrics show most problems of SQL jobs early:
| Metric | Scope | What it tells you |
|---|---|---|
numRestarts |
Job | How many times the job restarted. A rising count means that the job keeps failing. |
lastCheckpointDuration |
Job | How long the latest checkpoint took, in milliseconds. A growing duration often comes with backpressure or large state. |
numberOfFailedCheckpoints |
Job | How many checkpoints failed. Failed checkpoints make recovery and the stop of a job with a savepoint slower or impossible. |
isBackPressured,
backPressuredTimeMsPerSecond |
Task | Whether the tasks after it slow a task down, and for how many milliseconds of each second |
busyTimeMsPerSecond |
Task | How many milliseconds of each second the task is busy. A task near 1000 is the bottleneck of the job. |
numRecordsInPerSecond,
numRecordsOutPerSecond |
Task and operator | The throughput of each task and operator |
currentInputWatermark |
Operator | The latest watermark that the operator received. A watermark that does not advance holds back windows and other event-time results. |
pendingRecords |
Kafka source | How many records are waiting in Kafka to be read. A growing value means that the job falls behind its input. |
For the full list of metrics, see Metrics in the Apache Flink documentation. For the metrics of the Kafka source, see Apache Kafka connector in the Apache Flink documentation.
