
Lambda sends metrics to CloudWatch metrics. The monitoring tab of the function shows general metrics that can highlight problems in your workload.
Lambda also emits an OffsetLag metric while your function processes records. You can also use this to see whether your function is keeping up with the records added to the topic it is processing. The value is the difference in offset between the last record written to the Kafka topic and the last record that your function's consumer group processed.
If your OffsetLag starts increasing, this may indicate issues with pollers in your function's consumer group. For more information, see Offset lag metric for Amazon MSK as an event source for Lambda.
To check how many function invocations occur in parallel, you can monitor the concurrency metrics for your function.
If you're using the Provisioned mode there's an additional ProvisionedPollers Metric which is the the number of event pollers that are actively running.
For more Lambda information, see the Lambda Operator's Guide monitoring and observability section, which includes details on specific metrics to monitor.
Amazon MSK gathers Kafka metrics and sends them to CloudWatch. You can monitor the throughput of your Kafka topic using consumer metrics consumer_lag and consumer_offset.
For more information about Apache Kafka metrics, including the ones that Amazon MSK surfaces, see Monitoring in the Apache Kafka documentation.
You can also monitor your MSK cluster with Prometheus, an open-source monitoring application. For information about Prometheus, see Overview in the Prometheus documentation. To learn how to monitor your cluster with Prometheus, see Open monitoring with Prometheus.