I have read through this page https://docs.confluent.io/current/connect/managing/monitoring.html regarding Kafka Connect monitoring. It is not entirely clear how to define and emit my own set of metrics. For example, I want to emit the time delta between current tiemstamp and ConnectRecord timestamp within the SinkTask put() implementation, which gives me end-to-end latency. That is currently not defined in the list of Sink Task metrics.
How do I add custom metrics for SinkTask monitoring?