<a id="cc-oracle-xstream-cdc-source-monitoring"></a>

# Monitoring Oracle XStream CDC Source Connector for Confluent Cloud

The Oracle XStream CDC Source connector exposes metrics through
the [Confluent Cloud Metrics API](https://docs.confluent.io/cloud/current/monitoring/metrics-api.html#ccloud-metrics)
that are useful for monitoring the connector and troubleshooting issues.

## Connector metrics

The Oracle XStream CDC Source connector provides three metric types:

* [Snapshot metrics](#cc-oracle-xstream-snapshot-metrics)
* [Streaming metrics](#cc-oracle-xstream-streaming-metrics)
* [Schema history metrics](#cc-oracle-xstream-schema-history-metrics)

All metrics share the prefix
`io.confluent.kafka.connect/oracle_xstream_cdc_source_connector_`.
The tables below list only the metric suffix.

<a id="cc-oracle-xstream-snapshot-metrics"></a>

### Snapshot metrics

Snapshot metrics help you monitor the connector during snapshot
operations. These metrics are only available if a snapshot is currently
active or if the connector has performed a snapshot since it was last
started.

| Metric                                   | Type   | Description                                                                                                                             |
|------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `snapshot_milliseconds_since_last_event` | long   | The number of milliseconds since the connector last read and<br/>processed the most recent event, including those filtered out.         |
| `snapshot_total_number_of_events_seen`   | long   | The total number of events the connector has encountered since<br/>its last start or reset, including those filtered out.               |
| `snapshot_status_code`                   | int    | Current snapshot status. Values: `0` = NOT_STARTED,<br/>`1` = RUNNING, `2` = PAUSED, `3` = COMPLETED,<br/>`4` = ABORTED, `5` = SKIPPED. |
| `snapshot_duration_in_seconds`           | long   | The total running time for the snapshot, in seconds, including<br/>when it was paused.                                                  |

<a id="cc-oracle-xstream-streaming-metrics"></a>

### Streaming metrics

Streaming metrics help you monitor the connector when streaming changes
from the database.

| Metric                                        | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|-----------------------------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `streaming_connected_code`                    | int    | Whether the connector is currently streaming changes from the<br/>database server. Values: `0` = DISCONNECTED, `1` = CONNECTED.                                                                                                                                                                                                                                                                                                                   |
| `streaming_milliseconds_since_last_event`     | long   | The number of milliseconds since the connector last read and<br/>processed the most recent event, including those filtered out.                                                                                                                                                                                                                                                                                                                   |
| `streaming_total_number_of_events_seen`       | long   | The total number of events the connector has seen since its last<br/>start or reset, including those filtered out.                                                                                                                                                                                                                                                                                                                                |
| `streaming_number_of_events_filtered`         | long   | The number of events filtered out based on the include/exclude<br/>list rules configured in the connector.                                                                                                                                                                                                                                                                                                                                        |
| `streaming_number_of_committed_transactions`  | long   | The number of committed transactions that the connector has<br/>processed and dispatched.                                                                                                                                                                                                                                                                                                                                                         |
| `streaming_milliseconds_behind_source`        | long   | The number of milliseconds between the timestamp of the last<br/>change event and the time the connector processed it. This metric<br/>is computed based on the time when the change was generated in<br/>the source database’s redo log. Long-running transactions can<br/>cause this metric to show high values, because the connector only<br/>receives the transaction changes after the transaction is<br/>committed in the source database. |
| `streaming_commit_milliseconds_behind_source` | long   | The number of milliseconds between the timestamp of the last<br/>COMMIT event received and the time the connector processed it.                                                                                                                                                                                                                                                                                                                   |

#### NOTE
The source event timestamps for the
`streaming_milliseconds_behind_source` and
`streaming_commit_milliseconds_behind_source` metrics are in the
database server’s operating system timezone. Ensure that
`database.os.timezone` is set to the database server’s operating
system timezone.

<a id="cc-oracle-xstream-schema-history-metrics"></a>

### Schema history metrics

Schema history metrics help you monitor the status of the connector’s
schema history.

| Metric                       | Type   | Description                                                                                                                                 |
|------------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `schema_history_status_code` | int    | The state of the database schema history. Values: `0` = STOPPED,<br/>`1` = RECOVERING (recovering history from storage),<br/>`2` = RUNNING. |
