> ## Documentation Index
> Fetch the complete documentation index at: https://otel.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Flinkmetrics

> OpenTelemetry receiver for Flinkmetrics

# Flinkmetrics Receiver

![Status](https://img.shields.io/badge/status-alpha-red)

**Available in:** `contrib`

**Maintainers:** [@JonathanWamsley](https://github.com/JonathanWamsley)

**Source:** [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/flinkmetricsreceiver)

## Supported Telemetry

![Metrics](https://img.shields.io/badge/metrics-alpha-green)

## Overview

## Prerequisites

This receiver supports Apache Flink versions `1.13.6` and `1.14.4`.

By default, authentication is not required. However, [Flink recommends](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/security/security-ssl/#external--rest-connectivity) using a “side car proxy” that Binds the REST endpoint to the loopback interface and to start a REST proxy that authenticates and forwards the request to Flink.

[SSL](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/security/security-ssl/#external--rest-connectivity) can be enabled with the following REST endpoint [options](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/security/security-ssl/#rest-endpoints-external-connectivity) for external connectivity and have a self signed certificate or be self signed.

## Configuration

The following settings are optional:

* `endpoint` (default: `http://localhost:15672`): The URL of the node to be monitored.
* `collection_interval` (default = `10s`): This receiver collects metrics on an interval. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
* `tls`: TLS control. [By default, insecure settings are rejected and certificate verification is on](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md).
* `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example Configuration

> **Note:** The receiver type has been renamed from `flinkmetrics` to `flink_metrics`. The old name is still accepted but will log a deprecation warning.

```yaml theme={null}
receivers:
  flink_metrics:
    endpoint: http://localhost:8081
    collection_interval: 10s
```

The full list of settings exposed for this receiver are documented in [config.go](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/flinkmetricsreceiver/config.go) with detailed sample configurations in [testdata/config.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/flinkmetricsreceiver/testdata/config.yaml). TLS config is documented further under the [opentelemetry collector's configtls package](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md).

## Metrics

Details about the metrics produced by this receiver can be found in [metadata.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/flinkmetricsreceiver/metadata.yaml)

## Metrics

| Metric Name                                | Description                                                                                                   | Unit           | Type          | Attributes               |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------------------ |
| ✅ `flink.job.checkpoint.count`             | The number of checkpoints completed or failed.                                                                | \{checkpoints} | Counter       | checkpoint               |
| ✅ `flink.job.checkpoint.in_progress`       | The number of checkpoints in progress.                                                                        | \{checkpoints} | UpDownCounter |                          |
| ✅ `flink.job.last_checkpoint.size`         | The total size of the last checkpoint.                                                                        | By             | UpDownCounter |                          |
| ✅ `flink.job.last_checkpoint.time`         | The end to end duration of the last checkpoint.                                                               | ms             | Gauge         |                          |
| ✅ `flink.job.restart.count`                | The total number of restarts since this job was submitted, including full restarts and fine-grained restarts. | \{restarts}    | Counter       |                          |
| ✅ `flink.jvm.class_loader.classes_loaded`  | The total number of classes loaded since the start of the JVM.                                                | \{classes}     | Counter       |                          |
| ✅ `flink.jvm.cpu.load`                     | The CPU usage of the JVM for a jobmanager or taskmanager.                                                     | %              | Gauge         |                          |
| ✅ `flink.jvm.cpu.time`                     | The CPU time used by the JVM for a jobmanager or taskmanager.                                                 | ns             | Counter       |                          |
| ✅ `flink.jvm.gc.collections.count`         | The total number of collections that have occurred.                                                           | \{collections} | Counter       | garbage\_collector\_name |
| ✅ `flink.jvm.gc.collections.time`          | The total time spent performing garbage collection.                                                           | ms             | Counter       | garbage\_collector\_name |
| ✅ `flink.jvm.memory.direct.total_capacity` | The total capacity of all buffers in the direct buffer pool.                                                  | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.direct.used`           | The amount of memory used by the JVM for the direct buffer pool.                                              | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.heap.committed`        | The amount of heap memory guaranteed to be available to the JVM.                                              | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.heap.max`              | The maximum amount of heap memory that can be used for memory management.                                     | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.heap.used`             | The amount of heap memory currently used.                                                                     | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.mapped.total_capacity` | The number of buffers in the mapped buffer pool.                                                              | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.mapped.used`           | The amount of memory used by the JVM for the mapped buffer pool.                                              | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.metaspace.committed`   | The amount of memory guaranteed to be available to the JVM in the Metaspace memory pool.                      | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.metaspace.max`         | The maximum amount of memory that can be used in the Metaspace memory pool.                                   | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.metaspace.used`        | The amount of memory currently used in the Metaspace memory pool.                                             | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.nonheap.committed`     | The amount of non-heap memory guaranteed to be available to the JVM.                                          | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.nonheap.max`           | The maximum amount of non-heap memory that can be used for memory management.                                 | By             | UpDownCounter |                          |
| ✅ `flink.jvm.memory.nonheap.used`          | The amount of non-heap memory currently used.                                                                 | By             | UpDownCounter |                          |
| ✅ `flink.jvm.threads.count`                | The total number of live threads.                                                                             | \{threads}     | UpDownCounter |                          |
| ✅ `flink.memory.managed.total`             | The total amount of managed memory.                                                                           | By             | UpDownCounter |                          |
| ✅ `flink.memory.managed.used`              | The amount of managed memory currently used.                                                                  | By             | UpDownCounter |                          |
| ✅ `flink.operator.record.count`            | The number of records an operator has.                                                                        | \{records}     | Counter       | operator\_name, record   |
| ✅ `flink.operator.watermark.output`        | The last watermark this operator has emitted.                                                                 | ms             | UpDownCounter | operator\_name           |
| ✅ `flink.task.record.count`                | The number of records a task has.                                                                             | \{records}     | Counter       | record                   |

## Attributes

| Attribute Name | Description                                                                  | Type   | Values                                                                    |
| -------------- | ---------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| `checkpoint`   | The number of checkpoints completed or that failed.                          | string | `completed`, `failed`                                                     |
| `name`         | The names for the parallel scavenge and garbage first garbage collectors.    | string | `PS_MarkSweep`, `PS_Scavenge`, `G1_Young_Generation`, `G1_Old_Generation` |
| `name`         | The operator name.                                                           | string |                                                                           |
| `record`       | The number of records received in, sent out or dropped due to arriving late. | string | `in`, `out`, `dropped`                                                    |

## Resource Attributes

| Attribute Name         | Description                                        | Type   | Enabled |
| ---------------------- | -------------------------------------------------- | ------ | ------- |
| `flink.job.name`       | The job name.                                      | string | ✅       |
| `flink.resource.type`  | The flink scope type in which a metric belongs to. | string | ✅       |
| `flink.subtask.index`  | The subtask index.                                 | string | ✅       |
| `flink.task.name`      | The task name.                                     | string | ✅       |
| `flink.taskmanager.id` | The taskmanager ID.                                | string | ✅       |
| `host.name`            | The host name.                                     | string | ✅       |

## Configuration

### Example Configuration

```yaml theme={null}
flink_metrics:
  endpoint: http://localhost:8081
  collection_interval: 10s
```

***

*Last generated: 2026-07-06*
